Transcript
Maya opens a recipe site called Crumb. She taps "Sign in with Google". Two seconds later, she's in. And Crumb never saw her password. So how does Crumb know it's really her? There are three players. Maya, in her browser. Crumb, the site she wants to enter. And Google, who already knows her. One rule: her password only ever goes to Google. The steps they follow are called OAuth. Step one. Crumb sends her browser to Google, with a note attached. Who's asking: Crumb's client ID. What it wants: her name and email. Where to send her back: an address Crumb registered in advance. Now Maya is on Google's own page. She signs in there, and taps Continue to share her name and email. Step two. Google sends her back to Crumb, carrying a code. It works once, and only for a few minutes. Think of it as a claim slip, not a ticket. Someone who copies it still can't cash it in alone. Step three happens out of sight. Crumb's server calls Google directly. It hands over the code, plus a secret only Crumb knows. Google checks both, and replies with an ID token. That token is the real ticket. Issued by: Google. Written for: Crumb. Who: an account number for Maya. And when it expires. At the bottom, Google's signature. Step four: Crumb checks the ticket. It fetches Google's public keys, and confirms the signature is real. It checks the ticket was written for Crumb, and that it hasn't expired. Then Maya is in. One detail trips up a lot of sites. Her email address can change. So Google says: use sub, the account number. It never changes, and it's never reused. Why go to all this trouble? If Crumb ever gets hacked, there's no Google password there to steal. And Maya can cut Crumb off from her Google account at any time. So remember it like this. Your password goes only to Google. The site gets a signed ticket, never the key. Want to practise security hands-on? Try it free at seclern.com, and follow for more.