feat: delete the old token when refreshing token (#617)

Signed-off-by: Steve0x2a <stevesough@gmail.com>
This commit is contained in:
Yi Zhan 2022-03-24 19:58:12 +08:00 committed by GitHub
parent 04b9e05244
commit cd76e9372e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -439,6 +439,7 @@ func RefreshToken(grantType string, refreshToken string, scope string, clientId
TokenType: "Bearer", TokenType: "Bearer",
} }
AddToken(newToken) AddToken(newToken)
DeleteToken(&token)
tokenWrapper := &TokenWrapper{ tokenWrapper := &TokenWrapper{
AccessToken: token.AccessToken, AccessToken: token.AccessToken,