Let a user forget every trusted device after they lose a phone
Auth skips the second factor when a user signs in from a trusted device, until the trust period of that device ends. The revokeAll method of the trusted devices API removes that trust from every device on an account in one call and returns the number of devices that it revokes as revoked_count.
Impact
The Harrowgate Clinics security page in the sample calls a server action, which passes the account ID that auth() returns to revokeAll. The page then displays revoked_count, which is the number of devices where Auth will ask for the second factor at the next sign-in.
Prompt for a coding agent: Add a button that makes every trusted device ask for the second factor again.
Select a file to view its contents
