diff --git a/server/token/auth_token.go b/server/token/auth_token.go index 32d1085..d2eb454 100644 --- a/server/token/auth_token.go +++ b/server/token/auth_token.go @@ -137,7 +137,7 @@ func CreateRefreshToken(user models.User, roles, scopes []string, hostname, nonc "iat": time.Now().Unix(), "token_type": constants.TokenTypeRefreshToken, "roles": roles, - "scope": scopes, + "scope": strings.Join(scopes, " "), "nonce": nonce, "login_method": loginMethod, "allowed_roles": strings.Split(user.Roles, ","), @@ -177,7 +177,7 @@ func CreateAccessToken(user models.User, roles, scopes []string, hostName, nonce "exp": expiresAt, "iat": time.Now().Unix(), "token_type": constants.TokenTypeAccessToken, - "scope": scopes, + "scope": strings.Join(scopes, " "), "roles": roles, "login_method": loginMethod, "allowed_roles": strings.Split(user.Roles, ","),