fix: error handling for refresh_token revocation (#2609)

This commit is contained in:
Livio Amstutz
2021-11-03 14:10:01 +01:00
committed by GitHub
parent fc6154cffc
commit 3a7d68fccd

View File

@@ -172,7 +172,7 @@ func (o *OPStorage) RevokeToken(ctx context.Context, token, userID, clientID str
return oidc.ErrInvalidClient().WithDescription("token was not issued for this client")
}
_, err = o.command.RevokeRefreshToken(ctx, refreshToken.UserID, refreshToken.ResourceOwner, refreshToken.ID)
if errors.IsNotFound(err) {
if err == nil || errors.IsNotFound(err) {
return nil
}
return oidc.ErrServerError().WithParent(err)