Skip to content

Commit

Permalink
Using RawURLEncoding instead of RawStdEncoding in GenerateSecret (
Browse files Browse the repository at this point in the history
#34)

This might fix issues with random secrets, such as codes that contain problematic characters when transmitting them in a URL.
  • Loading branch information
oxisto authored Mar 4, 2022
1 parent 258f666 commit 8e0ac3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func GenerateSecret() string {

rand.Read(b)

return base64.RawStdEncoding.EncodeToString(b)
return base64.RawURLEncoding.EncodeToString(b)
}

func GenerateCodeChallenge(verifier string) string {
Expand Down

0 comments on commit 8e0ac3f

Please sign in to comment.