This commit is contained in:
uubulb 2024-12-31 22:13:58 +08:00
parent 5a054a4f23
commit 2f433472d5

View File

@ -182,7 +182,7 @@ func oauth2callback(jwtConfig *jwt.GinJWTMiddleware) func(c *gin.Context) (*mode
} }
jwtConfig.SetCookie(c, tokenString) jwtConfig.SetCookie(c, tokenString)
c.Redirect(http.StatusFound, utils.IfOr(state.Action == model.RTypeBind, "/dashboard/profile", "/dashboard/login?oauth2=true")) c.Redirect(http.StatusFound, utils.IfOr(state.Action == model.RTypeBind, "/dashboard/profile?oauth2=true", "/dashboard/login?oauth2=true"))
return &model.LoginResponse{Token: tokenString, Expire: expire.Format(time.RFC3339)}, nil return &model.LoginResponse{Token: tokenString, Expire: expire.Format(time.RFC3339)}, nil
} }