From 8e0ac3fbb6495dc268504c185c88d19184752dda Mon Sep 17 00:00:00 2001 From: Christian Banse Date: Fri, 4 Mar 2022 19:56:12 +0100 Subject: [PATCH] Using `RawURLEncoding` instead of `RawStdEncoding` in `GenerateSecret` (#34) This might fix issues with random secrets, such as codes that contain problematic characters when transmitting them in a URL. --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index e351a15..a48feb1 100644 --- a/server.go +++ b/server.go @@ -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 {