diff --git a/pkg/auth/credentials.go b/pkg/auth/credentials.go index a9b8f1c93..5e4b5c867 100644 --- a/pkg/auth/credentials.go +++ b/pkg/auth/credentials.go @@ -21,6 +21,7 @@ import ( "crypto/subtle" "encoding/base64" "fmt" + "strings" "time" jwtgo "github.com/dgrijalva/jwt-go" @@ -131,7 +132,7 @@ func GetNewCredentialsWithMetadata(m map[string]interface{}, tokenSecret string) if err != nil { return cred, err } - cred.SecretKey = string([]byte(base64.URLEncoding.EncodeToString(keyBytes))[:secretKeyMaxLen]) + cred.SecretKey = strings.Replace(string([]byte(base64.StdEncoding.EncodeToString(keyBytes))[:secretKeyMaxLen]), "/", "+", -1) cred.Status = "enabled" expiry, ok := m["exp"].(float64)