We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5811129 commit 58b5e4aCopy full SHA for 58b5e4a
httpapi/auth/gauth.go
@@ -61,6 +61,11 @@ func (h *GauthHandler) Login(c *gin.Context) {
61
return
62
}
63
64
+ redirectURI := c.Query("redirect_uri")
65
+ if redirectURI == "" {
66
+ redirectURI = h.oauthConfig.RedirectURL
67
+ }
68
+
69
callbackURL, err := url.Parse(h.oauthConfig.RedirectURL)
70
if err != nil {
71
c.JSON(http.StatusInternalServerError, gin.H{
@@ -82,7 +87,7 @@ func (h *GauthHandler) Login(c *gin.Context) {
82
87
83
88
c.SetCookie(
84
89
/* name */ redirectCookieName,
85
- /* value */ c.Request.URL.String(),
90
+ /* value */ redirectURI,
86
91
/* maxAge */ 5*60, // 5 min
92
/* path */ "/",
93
/* domain */ "",
0 commit comments