mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-07 22:46:06 +00:00
[wip] Delete tokens when authentication fails
todo: add spec
This commit is contained in:
@@ -81,5 +81,11 @@ class DfcRequest
|
||||
token: token.access_token,
|
||||
refresh_token: token.refresh_token
|
||||
)
|
||||
rescue Rack::OAuth2::Client::Error => e
|
||||
@user.oidc_account.update!(
|
||||
token: nil,
|
||||
refresh_token: nil
|
||||
)
|
||||
throw e
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user