mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-23 05:08:13 -05:00
query
This commit is contained in:
parent
5a054a4f23
commit
2f433472d5
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user