From 11dfaf520b2f3c8b17bff813c5e3e88366610801 Mon Sep 17 00:00:00 2001 From: tegwick Date: Sun, 13 Sep 2026 21:11:03 +0200 Subject: [PATCH] Reconcile recovery by support reference and bound provider lookup Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a092fe-13b1-7f12-ac74-7d258af4d79c --- src/user_engine/factor_recovery.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/user_engine/factor_recovery.py b/src/user_engine/factor_recovery.py index b46ab4e..503c93f 100644 --- a/src/user_engine/factor_recovery.py +++ b/src/user_engine/factor_recovery.py @@ -60,6 +60,7 @@ def page(csrf, result=None, submitted=None, management_url=''): 'factor_not_owned_by_target':'That authenticator no longer belongs to this login. Check the target.', 'reference_conflict':'This support reference belongs to another recovery. Check the recorded operation.', 'invalid_request':'Enter a valid login and support reference.', + 'account_not_found':'This directory login was not found. Check the exact login name.', } if failure: message=messages.get(failure,'Recovery could not be confirmed. A change may have occurred. Retry the same confirmation to reconcile the result, or check the support reference. Do not start another recovery blindly.') @@ -72,6 +73,14 @@ def page(csrf, result=None, submitted=None, management_url=''): if result.get('replayed'):html+=' This retry confirmed the earlier change without repeating it.' html+='

Return control to the user

  1. Have the user sign in to authenticator management with their own password.
  2. Enroll a replacement authenticator and prove possession with a generated code.
  3. Test a fresh application sign-in with the new code before closing the support case.

Applications requiring MFA remain inaccessible until a working factor is available. Never send passwords, setup QR codes or verification codes to the support case.

' if management_url:html+='

Open authenticator management

' + if result.get('status')=='not_found': + html+='

No provider recovery record matches this reference. Check the reference; this does not prove that no other operation occurred.

' + if result.get('status')=='pending': + html+='

Recovery completion needs reconciliation

Login: '+escape(result['user'])+'; authenticator: '+escape(result['serial'])+'. Current state: '+('active' if result['active'] else 'disabled')+'.

' + if result.get('confirmation'): + html+=apply_form(common,result['confirmation'],'Reconcile this recovery') + else: + html+='

The original administrator must reconcile this operation using the same support reference.

' factors=result.get('factors',[]) if result.get('status')=='preview' and not factors: html+='

No active authenticators were found for this login. Check the spelling and account. No change was made.

' @@ -81,6 +90,7 @@ def page(csrf, result=None, submitted=None, management_url=''): if failure and submitted.get('confirmation'): html+=apply_form(common,submitted['confirmation'],'Retry this recovery') html+='
'+common+hidden('action','preview')+'
' + html+='
'+common+'
' html+='

Cancel and return to platform administration ยท Investigate support activity

' return html