[wip] Delete tokens when authentication fails

todo: add spec
This commit is contained in:
David Cook
2025-01-22 11:00:33 +11:00
parent a3f916fc93
commit 00b78f47e3

View File

@@ -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