A device-local preference recorded only after a method actually succeeds. It is keyed by the identifier typed at sign-in, checked against the methods currently on offer, and silently ignored if the remembered method is no longer available.
Also called: remember login method · default to text code · stop asking me every time
- 1rememberMethod() writes only after the factor has verified, never on selection.
- 2readPreferredMethod() takes the list of currently available methods and returns the remembered one only if it is still offered.
- 3The storage key includes the lowercased identifier, so two people on one machine don't share a default.
- 4Any storage failure — private browsing, disabled storage, quota — returns null and the picker is shown.
The module explains why this is not stored on the user record: 'This is read BEFORE anyone is authenticated — that is the whole point, it decides how they authenticate. There is no session to hang a server-side preference on yet, and looking one up by email before sign-in would let an anonymous visitor probe which methods an address has.' The trade-off is stated rather than hidden: 'the preference does not follow anyone to a new browser… That is acceptable — it is a convenience default, never a restriction.' And the availability re-check prevents 'preparing a factor that cannot succeed' after a phone is removed or SMS is turned off.
- Re-selecting a verification method on every sign-in.
- A remembered method that the account no longer supports would fail silently.
- Storing the preference server-side would let anonymous visitors probe which methods an address has.
See it on your own jobs
Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.
or keep browsing features →