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

Expose TOKEN_EXPIRED error upon mfa unenroll. #6973

Merged
merged 2 commits into from
Jan 24, 2023
Merged

Conversation

prameshj
Copy link
Contributor

This can be thrown if the MFA option that was most recently enrolled into, was unenrolled. The user will be logged out to prove the posession of the other second factor. This error can be handled by reauthenticating the user.

This change also updates the demo app to store the lastUser in case mfa unenroll logs out the user. From here, the lastUser can be reauthenticated.

@changeset-bot
Copy link

changeset-bot bot commented Jan 24, 2023

🦋 Changeset detected

Latest commit: 6d22568

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/auth Patch
@firebase/auth-compat Patch
firebase Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 24, 2023

Size Report 1

Affected Products

  • @firebase/auth

    TypeBase (4604b3c)Merge (f190613)Diff
    browser157 kB156 kB-75 B (-0.0%)
    cordova184 kB184 kB-98 B (-0.1%)
    esm5205 kB205 kB-98 B (-0.0%)
    main149 kB148 kB-98 B (-0.1%)
    module157 kB156 kB-75 B (-0.0%)
    react-native168 kB168 kB-98 B (-0.1%)
  • @firebase/auth/cordova

    TypeBase (4604b3c)Merge (f190613)Diff
    browser184 kB184 kB-98 B (-0.1%)
    module184 kB184 kB-98 B (-0.1%)
  • @firebase/auth/internal

    TypeBase (4604b3c)Merge (f190613)Diff
    browser167 kB167 kB-75 B (-0.0%)
    esm5218 kB218 kB-98 B (-0.0%)
    main184 kB184 kB-98 B (-0.1%)
    module167 kB167 kB-75 B (-0.0%)
  • @firebase/auth/react-native

    TypeBase (4604b3c)Merge (f190613)Diff
    browser168 kB168 kB-98 B (-0.1%)
    module168 kB168 kB-98 B (-0.1%)
  • firebase

    TypeBase (4604b3c)Merge (f190613)Diff
    firebase-auth-compat.js126 kB126 kB-49 B (-0.0%)
    firebase-auth-cordova.js138 kB138 kB-84 B (-0.1%)
    firebase-auth-react-native.js150 kB150 kB-84 B (-0.1%)
    firebase-auth.js117 kB117 kB-50 B (-0.0%)
    firebase-compat.js746 kB746 kB-49 B (-0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/oiO6w6wwx6.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 24, 2023

Size Analysis Report 1

Affected Products

  • @firebase/auth

    • multiFactor

      Size

      TypeBase (4604b3c)Merge (f190613)Diff
      size33.7 kB33.6 kB-75 B (-0.2%)
      size-with-ext-deps54.3 kB54.2 kB-75 B (-0.1%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/I7VtC8t54N.html

Copy link
Contributor

@sam-gc sam-gc left a comment

Choose a reason for hiding this comment

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

This looks good, thanks!

This can be thrown if the MFA option that was most recently enrolled into, was unenrolled.
The user will be logged out to prove the posession of the other second factor.
This error can be handled by reauthenticating the user.

This change also updates the demo app to store the lastUser in case mfa unenroll logs out the user.
From here, the lastUser can be reauthenticated.
@prameshj prameshj merged commit 6439f11 into master Jan 24, 2023
@prameshj prameshj deleted the multiple-mfa-unenroll branch January 24, 2023 22:06
@google-oss-bot google-oss-bot mentioned this pull request Jan 31, 2023
@firebase firebase locked and limited conversation to collaborators Feb 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MFA bug on unenrolling last factor when you have more than one factor enrolled.
3 participants