Git Product home page Git Product logo

wpcodevo / two_factor_golang Goto Github PK

View Code? Open in Web Editor NEW
28.0 1.0 3.0 18 KB

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.

Home Page: https://codevoweb.com/two-factor-authentication-2fa-in-golang

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

two_factor_golang's Introduction

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

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

Related articles:

  1. How to Implement Two-factor Authentication (2FA) in React.js
  2. Two-factor Authentication (2FA) in FastAPI and Python
  3. How to Implement (2FA) Two-factor Authentication in Node.js

two_factor_golang's People

Contributors

wpcodevo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

two_factor_golang's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.