fix: Oauth callback url is fixed to host+/api/oidc/callback (#314)

This commit is contained in:
lejianwen
2025-07-11 09:55:48 +08:00
parent 16b941e37f
commit 1d2d1d4c98
9 changed files with 88 additions and 84 deletions

View File

@@ -143,7 +143,7 @@ func (o *Oauth) OidcAuthQuery(c *gin.Context) {
// @Produce json
// @Success 200 {object} apiResp.LoginRes
// @Failure 500 {object} response.ErrorResponse
// @Router /oauth/callback [get]
// @Router /oidc/callback [get]
func (o *Oauth) OauthCallback(c *gin.Context) {
state := c.Query("state")
if state == "" {

View File

@@ -49,6 +49,10 @@ func ApiInit(g *gin.Engine) {
frg.GET("/oauth/callback", o.OauthCallback)
frg.GET("/oauth/login", o.OauthCallback)
frg.GET("/oauth/msg", o.Message)
frg.GET("/oidc/callback", o.OauthCallback)
frg.GET("/oidc/login", o.OauthCallback)
frg.GET("/oidc/msg", o.Message)
}
{
pe := &api.Peer{}