mozilla / fxa

Monorepo for Mozilla Accounts (formerly Firefox Accounts)
https://mozilla.github.io/ecosystem-platform/
Mozilla Public License 2.0
589 stars 212 forks source link

bug(settings): Fix android manage account settings glitch #17241

Closed dschom closed 1 month ago

dschom commented 1 month ago

Because

This pull request

Issue that this pull request solves

Closes: FXA-10029

Checklist

Put an x in the boxes that apply

Other information (Optional)

Edge where this code becomes active can be hit with these two scenarios: Local cache cleared behind Firefox’s back

  1. Create an account email+1@gmail.com
  2. Click firefox menu > Sync and save data
  3. Select use email instead
  4. Sign in with email+1@gmail.com
  5. Provide confirmation code
  6. Observe settings page
  7. Close settings page
  8. In new tab (ie not from sync), go to accounts.stage.mozaws.net/clear
  9. Click Firefox menu > tz@mz.com > Manage account settings
  10. Observe that account settings load now
  11. Observe that tz@mz.com is the active user

Account signed out behind Firefox’s back

  1. Create an account tz@mz.com
  2. Click firefox menu > Sync and save data
  3. Sign in
  4. Observe settings page
  5. Close window
  6. In new tab go accounts.stage.mozaws.net/signin
  7. Sign in with tz@mz.com
  8. Click profile image in top right corner > click signout (This told our server to destroy tz@mozilla.com’s session!)
  9. Close window
  10. Click firefox menu > tz@mz.com > Manage account settings (you should be logged in still, and this option should be present)
  11. Observe Screen that says ‘Session Expired’ and instructs you to to signout from sync**

** Note that in the future we can make this seamless. At the time of writing, the sign out web channel message isn’t getting picked up by Firefox on android though, so to really sign out of sync, the user must do this themselves. A follow has been filed for this.