@@ -645,7 +645,7 @@ func handleRefreshToken(ctx *context.Context, form forms.AccessTokenForm, server
645645 if err != nil {
646646 handleAccessTokenError (ctx , AccessTokenError {
647647 ErrorCode : AccessTokenErrorCodeUnauthorizedClient ,
648- ErrorDescription : "client is not authorized " ,
648+ ErrorDescription : "unable to parse refresh token " ,
649649 })
650650 return
651651 }
@@ -688,14 +688,14 @@ func handleAuthorizationCode(ctx *context.Context, form forms.AccessTokenForm, s
688688 if ! app .ValidateClientSecret ([]byte (form .ClientSecret )) {
689689 handleAccessTokenError (ctx , AccessTokenError {
690690 ErrorCode : AccessTokenErrorCodeUnauthorizedClient ,
691- ErrorDescription : "client is not authorized " ,
691+ ErrorDescription : "invalid client secret " ,
692692 })
693693 return
694694 }
695695 if form .RedirectURI != "" && ! app .ContainsRedirectURI (form .RedirectURI ) {
696696 handleAccessTokenError (ctx , AccessTokenError {
697697 ErrorCode : AccessTokenErrorCodeUnauthorizedClient ,
698- ErrorDescription : "client is not authorized " ,
698+ ErrorDescription : "unexpected redirect URI " ,
699699 })
700700 return
701701 }
@@ -711,7 +711,7 @@ func handleAuthorizationCode(ctx *context.Context, form forms.AccessTokenForm, s
711711 if ! authorizationCode .ValidateCodeChallenge (form .CodeVerifier ) {
712712 handleAccessTokenError (ctx , AccessTokenError {
713713 ErrorCode : AccessTokenErrorCodeUnauthorizedClient ,
714- ErrorDescription : "client is not authorized " ,
714+ ErrorDescription : "failed PKCE code challenge " ,
715715 })
716716 return
717717 }
0 commit comments