Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

In this comprehensive guide, you will learn how to secure a Golang RESTful API with JSON Web Tokens and Email verification.

NotificationsYou must be signed in to change notification settings

wpcodevo/golang-gorm-postgres

 
 

Repository files navigation

This article will teach you how to add a secure forgot/reset password feature to a Golang RESTful API application. We will generate the HTML Email templates with the standard Golang template package and send them via SMTP with the Gomail package.

Forgot/Reset Passwords in Golang with SMTP HTML Email

Topics Covered

  • Forgot Password and Password Reset Flow
  • Create the Database Models with GORM
  • Create an SMTP Account
  • Setup the HTML Templates
    • Add the Email Template CSS
    • Add the Password Reset HTML Template
  • Encoding/Decoding the Password Reset Code
  • Create a Utility Function to Send the Emails
  • Add the Forgot Password Route Handler
  • Add the Reset Password Route Handler
  • Add the API Routes to the Gin Middleware Stack

Read the entire article here:https://codevoweb.com/forgot-reset-passwords-in-golang-with-html-email

Articles in this series:

1. How to Setup Golang GORM RESTful API Project with Postgres

How to Setup Golang GORM RESTful API Project with Postgres

2. API with Golang + GORM + PostgreSQL: Access & Refresh Tokens

API with Golang + GORM + PostgreSQL: Access & Refresh Tokens

3. Golang and GORM - User Registration and Email Verification

Golang and GORM - User Registration and Email Verification

4. Forgot/Reset Passwords in Golang with SMTP HTML Email

Forgot/Reset Passwords in Golang with SMTP HTML Email

5. Build a RESTful CRUD API with Golang

Build a RESTful CRUD API with Golang

About

In this comprehensive guide, you will learn how to secure a Golang RESTful API with JSON Web Tokens and Email verification.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp