frontend: log in to the new PDS by DID, not email, during migration

The inbound migration wizards authenticated against the destination PDS with the account's email as the createSession identifier. createSession only resolves DIDs and handles: 34f050a ("discoverable passkey authentication") dropped `OR email = $1` from get_login_full_by_identifier and renamed the lookups from *_by_handle_or_email to *_by_identifier, and 6ca6c45 added the AtIdentifier::new() check, which rejects anything that is not a DID or handle before the lookup. Email logins therefore fail with "Invalid identifier or password". The frontend was never updated. For passkey accounts this strands the user at the passkey step: completePasskeySetup succeeds server-side (passkey registered, app password minted, one-time setup token consumed), then the follow-up login with the email throws, so the wizard never advances to the app-password step and a retry reports "Setup has already been completed or expired". The password path fails after email verification the same way. Log in with the migrating DID instead (state.sourceDid for the inbound wizard, state.userDid for the offline one). The DID is preserved by migration and is always accepted by createSession, including for deactivated accounts via allowDeactivated. Adds login-identifier.test.ts, which models createSession rejecting emails and covers the inbound password and passkey paths and the offline password and passkey paths.

78c9a001 parent c72bdd2e +154 −6
browse files