|
1 |
| -#Build Golang RESTful API with Gorm, Gin and Postgres |
| 1 | +#Golang and GORM - User Registration and Email Verification |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +In this comprehensive guide, you will learn how to secure a Golang RESTful API with JSON Web Tokens and Email verification. We will start by registering the user, verifying the user's email address, logging in the registered user, and logging out the authenticated user. |
| 6 | + |
| 7 | +##Topics Covered |
| 8 | + |
| 9 | +- Golang and GORM JWT Authentication Overview |
| 10 | +- Create the Database Models with GORM |
| 11 | +- Database Migration with GORM |
| 12 | +- Generate and Verify the Password with Bcrypt |
| 13 | +- Sign and Verify the JWT (JSON Web Tokens) |
| 14 | +- Update the Environment Variables File |
| 15 | +- Validate the Variables with Viper |
| 16 | +- Generate the JSON Web Tokens |
| 17 | +- Verify the JSON Web Tokens |
| 18 | +- Create the SMTP Credentials |
| 19 | +- Setup the HTML Templates |
| 20 | +- Add the HTML Email Base Template |
| 21 | +- Add the HTML Email CSS Styles |
| 22 | +- Add the Email Verification Template |
| 23 | +- Create the Email Utility Function |
| 24 | +- Create the Controller Functions |
| 25 | +- Function to Generate the Verification Code |
| 26 | +- User Registration Controller |
| 27 | +- Verify Email Controller |
| 28 | +- Login User Controller |
| 29 | +- Logout User Controller |
| 30 | +- Get User Profile Controller |
| 31 | +- Create the Authentication Guard |
| 32 | +- Create Routes for the Controllers |
| 33 | +- Auth Routes |
| 34 | +- User Routes |
| 35 | +- Register the Routes and Start the Golang Server |
| 36 | + |
| 37 | +Read the entire article here:[https://codevoweb.com/golang-and-gorm-user-registration-email-verification](https://codevoweb.com/golang-and-gorm-user-registration-email-verification) |
| 38 | + |
| 39 | +Articles in this series: |
2 | 40 |
|
3 | 41 | ###1. How to Setup Golang GORM RESTful API Project with Postgres
|
4 | 42 |
|
|