diff --git a/auth/oauth.go b/auth/oauth.go index 54bd5137bcc..6e85575bfcf 100644 --- a/auth/oauth.go +++ b/auth/oauth.go @@ -2,6 +2,7 @@ package auth import ( "crypto/rand" + "encoding/hex" "errors" "fmt" "io" @@ -20,7 +21,7 @@ func randomString(length int) (string, error) { if err != nil { return "", err } - return fmt.Sprintf("%x", b), nil + return hex.EncodeToString(b), nil } // OAuthFlow represents the setup for authenticating with GitHub