From f52879d654a8c1b4c639aadca60decdc4281f3ff Mon Sep 17 00:00:00 2001 From: sawadashota Date: Wed, 16 Nov 2022 19:24:51 +0900 Subject: [PATCH] fix: fix server error of handling refresh token reuse (#704) --- handler/oauth2/flow_refresh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler/oauth2/flow_refresh.go b/handler/oauth2/flow_refresh.go index cf22cc7d1..77a5f91e5 100644 --- a/handler/oauth2/flow_refresh.go +++ b/handler/oauth2/flow_refresh.go @@ -48,7 +48,7 @@ func (c *RefreshTokenGrantHandler) HandleTokenEndpointRequest(ctx context.Contex if errors.Is(err, fosite.ErrInactiveToken) { // Detected refresh token reuse if rErr := c.handleRefreshTokenReuse(ctx, signature, originalRequest); rErr != nil { - return errorsx.WithStack(fosite.ErrServerError.WithWrap(rErr).WithDebug(rErr.Error())) + return errorsx.WithStack(rErr) } return errorsx.WithStack(fosite.ErrInactiveToken.WithWrap(err).WithDebug(err.Error()))