Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(settings): Navigate to confirmation if we don't have the recoveryKey #18156

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jonalmeida
Copy link
Contributor

Because

  • We can sometimes get into a point where the page is unloaded after a new
    recovery key is created. We want to gracefully handle this flow since
    the user is already verified.

This pull request

  • We navigate to /reset_password_confirmed if we don't have the recovery key anymore in the SensitiveDataClient.

Issue that this pull request solves

Closes: FXA-10869

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

n/a

Other information (Optional)

Built on top of #18136. Will rebase when the prior PR lands.

We can sometimes get into a point where the page is unloaded after a new
recovery key is created. We want to gracefully handle this flow since
the user is already verified.

Fixes FXA-10869
SensitiveData.Key.NewRecoveryKey
)?.recoveryKey;

if (!recoveryKey) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we should lift the check for sessionToken and uid out of the navigateNext function and above the check for recoveryKey - if that data is not in local storage then we might as well go directly to signin

recoveryKeyId,
recoveryKeyExists,
estimatedSyncDeviceCount,
} = location.state as CompleteResetPasswordLocationState;

const kB = sensitiveDataClient.getDataType(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants