fix: pkce flow for oauth login

This commit is contained in:
Lakhan Samani
2024-01-08 14:21:24 +05:30
parent 3bd3a52d3b
commit e5fbaa26e1
4 changed files with 17 additions and 6 deletions

View File

@@ -123,7 +123,7 @@ func AuthorizeHandler() gin.HandlerFunc {
// TODO add state with timeout
// used for response mode query or fragment
authState := "state=" + state + "&scope=" + strings.Join(scope, " ") + "&redirect_uri=" + redirectURI
authState := "state=" + state + "&scope=" + scopeString + "&redirect_uri=" + redirectURI
if responseType == constants.ResponseTypeCode {
authState += "&code=" + code
if err := memorystore.Provider.SetState(state, code+"@@"+codeChallenge); err != nil {