mirror of
https://github.com/Dvorinka/excalidraw-full.git
synced 2026-06-03 22:02:57 +00:00
重构认证流程,合并 GitHub 和 OIDC 登录路由,更新回调 URL,简化环境变量配置,移除旧的 Dex 相关代码,增强代码可读性和维护性。更新文档以反映新的认证流程和环境变量设置。
This commit is contained in:
@@ -166,14 +166,9 @@ func setupRouter(store stores.Store) *chi.Mux {
|
||||
})
|
||||
})
|
||||
|
||||
r.Route("/auth/github", func(r chi.Router) {
|
||||
r.Get("/login", auth.HandleGitHubLogin)
|
||||
r.Get("/callback", auth.HandleGitHubCallback)
|
||||
})
|
||||
|
||||
r.Route("/auth/oidc", func(r chi.Router) {
|
||||
r.Get("/login", auth.HandleOIDCLogin)
|
||||
r.Get("/callback", auth.HandleOIDCCallback)
|
||||
r.Route("/auth", func(r chi.Router) {
|
||||
r.Get("/login", auth.HandleLogin)
|
||||
r.Get("/callback", auth.HandleCallback)
|
||||
})
|
||||
|
||||
return r
|
||||
@@ -311,8 +306,7 @@ func main() {
|
||||
FullTimestamp: true,
|
||||
})
|
||||
|
||||
auth.Init()
|
||||
auth.InitDex()
|
||||
auth.InitAuth()
|
||||
openai.Init()
|
||||
store := stores.GetStore()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user