PSA: delete token from settings db if invalid (#16183)
This commit is contained in:
parent
0157ea6276
commit
6be3ed02d1
1 changed files with 3 additions and 0 deletions
|
|
@ -71,6 +71,9 @@ func (v *Identity) RefreshToken(token *oauth2.Token) (*oauth2.Token, error) {
|
|||
|
||||
tok, err := v.oc.TokenSource(ctx, token).Token()
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "invalid_grant") {
|
||||
settings.Delete(v.subject)
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue