Skip to content

Commit fa27c2e

Browse files
committed
Don't check for expired token when doing refresh
Signed-off-by: Daishan Peng <[email protected]>
1 parent abb4669 commit fa27c2e

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

main.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,15 +1352,6 @@ func (p *OAuthProxy) handleRefreshTokenGrant(c *gin.Context, clientID string) {
13521352
return
13531353
}
13541354

1355-
// Check if token is expired
1356-
if time.Now().After(tokenData.ExpiresAt) {
1357-
c.JSON(http.StatusBadRequest, OAuthError{
1358-
Error: "invalid_grant",
1359-
ErrorDescription: "Token has expired",
1360-
})
1361-
return
1362-
}
1363-
13641355
// Check if token belongs to the requesting client
13651356
if tokenData.ClientID != clientID {
13661357
c.JSON(http.StatusBadRequest, OAuthError{

0 commit comments

Comments
 (0)