An open API service indexing awesome lists of open source software.

https://github.com/wpcodevo/two_factor_golang

This article will teach you how to secure a Golang API by implementing two-factor authentication (2FA) using TOTP codes generated by an authenticator app like Google Authenticator or Authy.
https://github.com/wpcodevo/two_factor_golang

2fa-golang 2factor crud-api golang golangapi otp otp-golang otp-verification totp totp-tokens

Last synced: 16 days ago
JSON representation

This article will teach you how to secure a Golang API by implementing two-factor authentication (2FA) using TOTP codes generated by an authenticator app like Google Authenticator or Authy.

Awesome Lists containing this project

README

        

# How to Implement (2FA) Two-factor Authentication in Golang

This article will teach you how to secure a Golang API by implementing two-factor authentication (2FA)
using TOTP codes generated by an authenticator app like Google Authenticator or Authy.

![How to Implement (2FA) Two-factor Authentication in Golang](https://codevoweb.com/wp-content/uploads/2022/10/How-to-Implement-Two-factor-Authentication-2FA-in-Golang.webp)

## Topics Covered

- What is Two-Factor Authentication (2FA)
- Run the Golang 2FA App Locally
- Run the 2FA Frontend Built with React.js
- Two-factor Authentication in Golang Overview
- Setup the 2FA feature
- Generate the QR Code
- Enable the 2FA feature
- Validate the TOTP token
- Disable the 2FA Feature
- Setup the Golang Project
- Create the Database Model with GORM
- Create the Golang Route Handlers
- Register User Handler
- Login User Handler
- Generate the TOTP token
- Verify the TOTP token
- Validate the TOTP token
- Disable the TOTP Feature
- Create the Gin Gonic API Routes
- Add Routes to Gin Gonic Middleware

Read the entire article here: [https://codevoweb.com/two-factor-authentication-2fa-in-golang](https://codevoweb.com/two-factor-authentication-2fa-in-golang)

Related articles:

1. [How to Implement Two-factor Authentication (2FA) in React.js](https://codevoweb.com/two-factor-authentication-2fa-in-reactjs)
2. [Two-factor Authentication (2FA) in FastAPI and Python](https://codevoweb.com/two-factor-authentication-2fa-in-fastapi-and-python)
3. [How to Implement (2FA) Two-factor Authentication in Node.js](https://codevoweb.com/two-factor-authentication-2fa-in-nodejs)