Because:
- After signing into Sync, users were sometimes redirected to /signin
instead of /pair, even though Firefox had received the new login.
- /pair's bootstrap calls firefox.requestSignedInUser immediately after
the page's fxaLogin / fxaOAuthLogin message. If Firefox has not yet
processed that login, it returns no user; /pair then starts a fresh
OAuth flow and hardNavigates to /, where the Index page routes the
cached account to /signin.
This commit:
- Retries requestSignedInUser once in Pair/Index/index.tsx before
falling through to fxaOAuthFlowBegin. Each call carries its own 500ms
WebChannel timeout, so worst case on a cold visit with no Sync user
is around one second.
- Adds two unit tests in Pair/Index/index.test.tsx: one for the retry
success path, one for the retry cap.
Closes: FXA-13724