Skip to content

Conversation

@luannmoreira
Copy link
Member

Description

This PR fixes a bug where the name value was not initialized before making MFA-related API calls. As a result, recoverMfa and requestResetMfa could fail due to missing or incorrect identifiers.

Reasoning

The name value is required for MFA recovery and reset operations. Without explicitly initializing it from localStorage, these functions could behave unexpectedly or fail entirely if name.value is empty or undefined.

Changes introduced

Load name from localStorage in:

  • recoverMfa
  • requestMfaReset

How to test

  1. Simulate an MFA recovery or reset flow without prior setting of name.
  2. Confirm that the name is correctly loaded from localStorage.
  3. Ensure the API calls succeed with the expected parameters.

Set name from localStorage before calling recoverMfa and requestResetMfa
to avoid issues where name was not initialized, causing failures.
@luannmoreira luannmoreira self-assigned this Sep 2, 2025
@luannmoreira luannmoreira requested a review from a team as a code owner September 2, 2025 18:05
@luannmoreira luannmoreira added kind/bug Something isn't working area/ui javascript Pull requests that update Javascript code status/good-to-merge labels Sep 2, 2025
@gustavosbarreto gustavosbarreto merged commit b4c91e3 into master Sep 2, 2025
16 checks passed
@gustavosbarreto gustavosbarreto deleted the fix/auth-mfa-name branch September 2, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ui javascript Pull requests that update Javascript code kind/bug Something isn't working status/good-to-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants