feat: 2fa/otp support

This commit is contained in:
Noah Hsu
2022-08-06 01:22:13 +08:00
parent b51e664543
commit a6ed4afdae
6 changed files with 83 additions and 1 deletions

View File

@ -25,6 +25,8 @@ func Init(r *gin.Engine) {
api.POST("/auth/login", handles.Login)
auth.GET("/me", handles.CurrentUser)
auth.POST("/me/update", handles.UpdateCurrent)
auth.POST("/auth/2fa/generate", handles.Generate2FA)
auth.POST("/auth/2fa/verify", handles.Verify2FA)
// no need auth
public := api.Group("/public")