mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
feat: 2FA authorization for web terminal
This commit is contained in:
parent
802d05f692
commit
3a22861640
15 changed files with 359 additions and 54 deletions
|
@ -86,7 +86,7 @@ func Login(c *gin.Context) {
|
|||
}
|
||||
|
||||
// Check if the user enables 2FA
|
||||
if len(u.OTPSecret) > 0 {
|
||||
if u.EnabledOTP() {
|
||||
if json.OTP == "" && json.RecoveryCode == "" {
|
||||
c.JSON(http.StatusOK, LoginResponse{
|
||||
Message: "The user has enabled 2FA",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue