@@ -645,7 +645,7 @@ func handleRefreshToken(ctx *context.Context, form forms.AccessTokenForm, server
645
645
if err != nil {
646
646
handleAccessTokenError (ctx , AccessTokenError {
647
647
ErrorCode : AccessTokenErrorCodeUnauthorizedClient ,
648
- ErrorDescription : "client is not authorized " ,
648
+ ErrorDescription : "unable to parse refresh token " ,
649
649
})
650
650
return
651
651
}
@@ -688,14 +688,14 @@ func handleAuthorizationCode(ctx *context.Context, form forms.AccessTokenForm, s
688
688
if ! app .ValidateClientSecret ([]byte (form .ClientSecret )) {
689
689
handleAccessTokenError (ctx , AccessTokenError {
690
690
ErrorCode : AccessTokenErrorCodeUnauthorizedClient ,
691
- ErrorDescription : "client is not authorized " ,
691
+ ErrorDescription : "invalid client secret " ,
692
692
})
693
693
return
694
694
}
695
695
if form .RedirectURI != "" && ! app .ContainsRedirectURI (form .RedirectURI ) {
696
696
handleAccessTokenError (ctx , AccessTokenError {
697
697
ErrorCode : AccessTokenErrorCodeUnauthorizedClient ,
698
- ErrorDescription : "client is not authorized " ,
698
+ ErrorDescription : "unexpected redirect URI " ,
699
699
})
700
700
return
701
701
}
@@ -711,7 +711,7 @@ func handleAuthorizationCode(ctx *context.Context, form forms.AccessTokenForm, s
711
711
if ! authorizationCode .ValidateCodeChallenge (form .CodeVerifier ) {
712
712
handleAccessTokenError (ctx , AccessTokenError {
713
713
ErrorCode : AccessTokenErrorCodeUnauthorizedClient ,
714
- ErrorDescription : "client is not authorized " ,
714
+ ErrorDescription : "failed PKCE code challenge " ,
715
715
})
716
716
return
717
717
}
0 commit comments