pocket-casts-ios
pocket-casts-ios copied to clipboard
Apple SSO: Watch token refresh
| 📘 Project: #381 |
|---|
| 📓 In my testing, Apple SSO didn't always return the email in the simulator, so testing with a physical device is recommended. |
|---|
Syncs the user login tokens to the watch to preserve session management.
To test
Setup
- Enable the Feature Flag
signInWithApple - Set your scheme to
Staging
Testing
You'll want to perform these tests with Username and Password, and Apple SSO as the flow changes touched each path.
- Login on the App
- Open the watch app
- Trigger an account refresh if the app doesn't trigger one itself
- The app can be slow to send messages on builds from Xcode so be patient.
- Expect to be logged in to the same account as the phone.
- Log out and try the other path.
Checklist
- [x] I have considered if this change warrants user-facing release notes and have added them to
CHANGELOG.mdif necessary. - [x] I have considered adding unit tests for my changes.
- [ ] I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.
To add more info:
- I tried with the flag disabled
- Logged in with email/password
- I briefly see my email
- The interface changes to "Not Signed In"
@leandroalonso 🤔
I wonder if I need to bring this downstream change up to this branch. I'll take a look today.
@leandroalonso I believe that was the problem. Can you test this again?
@chipsnyder I'll test again. However, I think we should expand this task's test scenario to ensure it doesn't affect any possible paths before merging. Here's my plan:
With the flag disabled
- Test a currently logged-in user, and make sure the app behaves correctly (maybe force some token refresh)
- Login with email/password and make sure the app behaves correctly
With the flag enabled
- Test a currently logged-in user, and make sure the app behaves correctly (maybe force some token refresh)
- Login with email/password and make sure the app behaves correctly
- Test a currently logged-in user that used Apple SSO, and make sure the app behaves correctly (maybe force some token refresh)
- Login with Apple SSO and make sure the app behaves correctly