You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

Sign in with Google: how OAuth lets an app in without your password

Sign in with Google: why an app should never ask for your Google password

An app only wants a look at your Google Calendar, and asks for your Google password to get it. Why saying yes would hand over far more than a calendar.

  1. 1 Miva hosts a supper club for her friends, and finding a date used to take weeks of messages. So Rono built a small app for it, supperclub.example. It looks at everyone's Google Calendar and finds an evening when all of you are free.Mivasupperclub.exampleThu: freeMivaThu: freeRonoThu: freeyou

    Miva hosts a supper club for her friends, and finding a date used to take weeks of messages. So Rono built a small app for it, supperclub.example. It looks at everyone's Google Calendar and finds an evening when all of you are free.

  2. 2 To look at your calendar, the app needs a way into your Google account. The plain way would be to ask for your password. Around 2008, big websites really did this: type your email password, and we will find your friends in your contacts.supperclub.exampleGoogle emailGooglepasswordGo

    To look at your calendar, the app needs a way into your Google account. The plain way would be to ask for your password. Around 2008, big websites really did this: type your email password, and we will find your friends in your contacts.

  3. 3 But your password does not open only your calendar. It opens your email, your photos, your files, even the page where the password is changed. Whoever holds it can do everything you can.your passwordcalendaremailphotosfileschange yourpassword

    But your password does not open only your calendar. It opens your email, your photos, your files, even the page where the password is changed. Whoever holds it can do everything you can.

  4. 4 And it stays. The app has to keep your password to use it again next month. So a break-in at one tiny app would hand a stranger the key to your whole Google account.supperclub.examplekept fornext montha stranger

    And it stays. The app has to keep your password to use it again next month. So a break-in at one tiny app would hand a stranger the key to your whole Google account.

  5. 5 Changed your mind? The only way to take your password back is to change it, and that cuts off every other app you gave it to as well. You cannot say no to just one.youNew passwordsupperclubapp 2app 3

    Changed your mind? The only way to take your password back is to change it, and that cuts off every other app you gave it to as well. You cannot say no to just one.

  6. 6 So the app needs something much smaller than your password, with these three promises. A way called OAuth gives an app exactly that, and it starts with a button you have seen a hundred times.your calendar onlyfor a whileeasy to take back

    So the app needs something much smaller than your password, with these three promises. A way called OAuth gives an app exactly that, and it starts with a button you have seen a hundred times.

  7. Go further

    A few names behind the story.third-party appan app made by someoneother than Google,like Rono'spassword anti-patternwhat developers called it,around 2008, when an appasked for your passwordOAuththe open standard behindSign in with Google, andbehind the sign-in buttonsof Apple and Microsoft too

    A few names behind the story.

Next episode OAuth redirect: where you really type your password when you sign in with Google

Share this comic

More comics