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 0787a3b commit 07552bcCopy full SHA for 07552bc
server/handlers/token.go
@@ -54,7 +54,9 @@ func TokenHandler() gin.HandlerFunc {
54
55
hash := sha256.New()
56
hash.Write([]byte(codeVerifier))
57
- encryptedCode := strings.TrimSuffix(base64.URLEncoding.EncodeToString(hash.Sum(nil)), "=")
+ encryptedCode := strings.ReplaceAll(base64.URLEncoding.EncodeToString(hash.Sum(nil)), "+", "-")
58
+ encryptedCode = strings.ReplaceAll(encryptedCode, "/", "_")
59
+ encryptedCode = strings.ReplaceAll(encryptedCode, "=", "")
60
sessionData := sessionstore.GetState(encryptedCode)
61
if sessionData == "" {
62
gc.JSON(http.StatusBadRequest, gin.H{
0 commit comments