Enrollment, replacement, and recovery
An authenticatorSomething a person controls and uses to prove control of an account, such as a memorized password, an app that generates one-time codes, or a security key. It counts only after it has been registered to that account. has a life beyond the sign-in page. It has to be tied to the right account before its first use, replaced without leaving a gap, and removed when it is lost, and the person needs a way back in if every method is gone.
Before the first sign-in
Ava Archer buys a new phone and wants to use a passkeyA credential that your phone, computer or password manager creates for one website and keeps for you, unlocked with a fingerprint, face or PIN. Nothing you could type is sent, and it works only for the site it was made for, which helps it resist phishing. on it to sign in to Lab Photos. Before the passkey can open her account, Lab Photos must associate its credential with her account. This is enrollment. Without it, a valid signatureA value made with a private key that lets anyone holding the matching public key check that a message came from the key's holder and has not been changed. It proves origin and integrity; it does not hide the message. from the new phone would tell Lab Photos nothing about which account Ava is trying to use.
A new account's first method is usually set up while the account is created, sometimes after the identity proofingA process for establishing confidence that someone is the real person they claim to be, for example by checking identity documents and confirming that the evidence belongs to the person presenting it. in What proofing establishes. Every later addition needs suitable proof from the person who already controls the account, usually a recent sign-in with a method that is already enrolled. Knowing Ava's email address is not enough to add another way to sign in, because an email address identifies an account without proving anything about who typed it.
The confirmation depends on the method. An authenticator app shows that it produces a valid code from the secret it was just given. A passkey returns a registration response that Lab Photos validates, as Registering a key described. Before an email address or phone number becomes a place to send recovery messages, Ava must show she can receive messages there.
Adding and replacing methods
Ava's old phone still works while she sets up the new one. Lab Photos first asks her to sign in again if her last sign-in was not recent, because a browser that has been left open is not proof that Ava is the person at it. She then enrolls the new phone's passkey and confirms it can sign in. Only then does she remove the old phone's passkey. Removing it first could leave her without a working method.
A list of enrolled methods helps Ava find the right one to remove. Names and enrollment dates can distinguish her laptop's passkey from the old phone's without displaying secret material. A name is only a label, though; it does not prove who holds the device now.
Ava also needs a backup before anything is lost. Depending on the service, that might be a second registered passkey on another device, recovery codes kept somewhere safe, or a recovery process run by the service's support staff. A backup kept only on the phone she might lose will not help.
Lab Photos records every method change and tells Ava about it through a channel she already had, such as her registered email address. A notification may reveal a change she did not make, but the service still has to authorize each change before making it.
When a device is lost
A month later Ava leaves her phone on a train. Two things may have changed. She might have lost a way to sign in, and someone else might now hold the phone, with a Lab Photos sessionThe ongoing connection between later requests and an earlier sign-in, so you are not asked for your password on every click. It is often tracked with a cookie holding an unpredictable session identifier. still open on it. Recovery restores Ava's access. Revocation tells Lab Photos to stop accepting a credential that can no longer be trusted.
Removing the lost phone's credential from Ava's account stops future sign-ins with it at Lab Photos. It does not erase a key from the phone, and it does not end sessions that are already open. A session, as Staying signed in explained, lets a browser return without signing in again, so whoever holds the phone stays signed in until that session is ended as well. Removing the credential and ending the session are separate controls, and a lost device needs both.
Remove the passkey only
- Sign-ins with the old passkey
- Refused
- Session open on the phone
- Still signed in
- Key stored on the phone
- Still there
The open session keeps working
End the session only
- Sign-ins with the old passkey
- Still accepted
- Session open on the phone
- Ended
- Key stored on the phone
- Still there
The passkey can sign in again
Both
- Sign-ins with the old passkey
- Refused
- Session open on the phone
- Ended
- Key stored on the phone
- Still there
Nothing on the phone still gets in
Removing the credential and ending the session are separate controls, and a lost device needs both.
When the passkey lives with a provider
Suppose Ava's passkey for Lab Photos is a synced passkey, copied between her devices by her password manager, as Where keys live described. When she loses her phone, the passkey is not lost with it: it is still in her provider account and on her laptop. That makes ordinary loss far less painful, and it moves part of her recovery to the provider. Getting back into the provider account on a new phone, through the provider's own recovery process, brings every synced passkey back with it.
It also changes what a lost device means. If the phone was stolen unlocked, the thief may be able to use the passkeys on it until Ava removes the phone from her provider account. Removing the passkey at Lab Photos stops it everywhere for Lab Photos at once, because Lab Photos deletes the public keyThe half of a key pair that can be shared freely. It checks signatures made with the matching private key and can encrypt data that only that private key can decrypt., but it leaves the private keyThe half of a key pair that its owner keeps to themselves and uses to create signatures or decrypt data. Anyone who obtains it can act as its owner. on every device that synced it, where the password manager may keep offering it. The two removals act in different places, and Ava may need both.
For Lab Photos, a synced passkey is one credential however many devices hold it, and it cannot see which devices those are. Its job after a loss is the same as for any credential: decide whether to remove it, end sessions that may be in the wrong hands, and confirm afterward that a removed credential is refused, even though a device still offers it.
Recovery without a shortcut
If Ava loses every enrolled method, Lab Photos needs another way to establish that she may have the account back. It could use recovery codes issued earlier, a recovery address she confirmed earlier, or a process run by its support staff with checks of its own. Simply knowing the account's email address cannot be enough.
A recovery code is a secret, issued in advance, that can open the account when the usual methods are unavailable. Ava needs to store hers somewhere separate from the device they back up. Because a recovery code can stand in for every other method, Lab Photos treats it like the passwords in Passwords and PINs: it stores only a hashTurning data into a short, fixed-size value called a hash, in a way that cannot be reversed and where changing one character changes the result completely. Services store password hashes instead of passwords, and signatures are made over a hash., lets each code work once, limits guesses, and cancels the old set when it issues a new one.
When support staff help with recovery, they need defined authority and a defined way to check the request. Ben Okafor, on Lab Photos' help desk, can end a customer's sessions and reset their sign-in methods only because his management role grants those actions, and only after the checks the help desk has agreed in advance. Each decision is recorded without storing recovery codes or other secrets. A persuasive caller, or the answer to a personal question someone else could look up, cannot replace those checks. Attacks on recovery and the help desk, in the Identity security lessons, follows attackers who try.
Recovery also has to work in ordinary situations: for someone who has changed phone numbers, does not own a smartphone, or cannot use a fingerprint reader.
A recovery walkthrough
Here is Ava's lost phone handled in order. She still has a separately registered passkey on her laptop, the backup she set up before anything was lost.
- Ava opens Lab Photos by typing its address herself, rather than following a link in a message, and signs in with the laptop's passkey.
- That sign-in happened moments ago with a phishing-resistantA property of an authentication method that binds sign-in to the real service, so evidence entered on a look-alike site cannot be passed on and used. Passkeys have it; passwords and one-time codes do not. method, so Lab Photos accepts it as the recent sign-in it requires before any change to sign-in methods.
- Ava removes the lost phone's passkey and ends the session that is still open on the phone. Lab Photos records both changes, without credential values.
- On her new phone, Ava enrolls a replacement passkey and confirms it works. Lab Photos sends a security notification to her registered email address.
- Ava checks that an independent backup still remains, so the next loss is not a lockout.
If Ava had lost the laptop as well, this sequence could not begin with an ordinary sign-in. Lab Photos would need its recovery process, such as a recovery code, before allowing anyone to replace a credential. And when Cora Diaz calls the help desk about her own lost phone, Ben takes the same two actions from his side: he ends the session on Cora's phone and resets her sign-in methods, then checks that both were recorded.
Check your understanding
Try these questions before moving on. If an answer isn't right, use the feedback and try again.
Try it in the Lab
- Replace a method, use a recovery code and reset a lost userGive a temporary person a backup before anything is lost, replace her passkey new one first, use and retire recovery codes, then act as the help desk for someone else's lost phone.