feat: rebuild Single sign-on system (#3649 close #3571)

* rebuild single sign on system

* perf: use cache

* fix: codefactor check

---------

Co-authored-by: Andy Hsu <i@nn.ci>
This commit is contained in:
itsHenry
2023-03-02 17:55:33 +08:00
committed by GitHub
parent f442185aa5
commit 603681fbe6
9 changed files with 237 additions and 155 deletions

View File

@ -43,8 +43,8 @@ func Init(e *gin.Engine) {
auth.POST("/auth/2fa/verify", handles.Verify2FA)
// github auth
api.GET("/auth/github", handles.GithubLoginRedirect)
api.GET("/auth/github_callback", handles.GithubLoginCallback)
api.GET("/auth/sso", handles.SSOLoginRedirect)
api.GET("/auth/sso_callback", handles.SSOLoginCallback)
// no need auth
public := api.Group("/public")