fix: refresh_token api return old token (#623)

Signed-off-by: Steve0x2a <stevesough@gmail.com>
This commit is contained in:
Yi Zhan 2022-03-27 23:10:05 +08:00 committed by GitHub
parent 544cd40a08
commit 879ca6a488
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -442,12 +442,12 @@ func RefreshToken(grantType string, refreshToken string, scope string, clientId
DeleteToken(&token)
tokenWrapper := &TokenWrapper{
AccessToken: token.AccessToken,
IdToken: token.AccessToken,
RefreshToken: token.RefreshToken,
TokenType: token.TokenType,
ExpiresIn: token.ExpiresIn,
Scope: token.Scope,
AccessToken: newToken.AccessToken,
IdToken: newToken.AccessToken,
RefreshToken: newToken.RefreshToken,
TokenType: newToken.TokenType,
ExpiresIn: newToken.ExpiresIn,
Scope: newToken.Scope,
}
return tokenWrapper