Increase the thing
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled

This commit is contained in:
Dan Milne
2025-10-24 20:48:58 +11:00
parent e36850f8ba
commit 5463723455
6 changed files with 127 additions and 5 deletions

View File

@@ -80,6 +80,15 @@ class User < ApplicationRecord
.find { |consent| consent.covers_scopes?(requested_scopes) }
end
def revoke_consent!(application)
consent = oidc_user_consents.find_by(application: application)
consent&.destroy
end
def revoke_all_consents!
oidc_user_consents.destroy_all
end
private
def generate_backup_codes