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

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

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

OAuth scopes: what the consent screen of Sign in with Google really asks

Before an app gets anything from your Google account, Google shows you a short list. What each line of the OAuth consent screen means, and who your answer really goes to.

  1. 1 Before Google sends you back to the app, it shows you one more page: the app's name, and a short list of what it wants to do with your account. This page is the consent screen.accounts.google.comsupperclub.examplewants to:know your name,email and photosee yourcalendarCancelAllow

    Before Google sends you back to the app, it shows you one more page: the app's name, and a short list of what it wants to do with your account. This page is the consent screen.

  2. 2 The list comes from the app. When it sent you to Google, it named each thing it wants, and each one is called a scope.supperclub.exampleGooglescopes asked forname, email, photosee calendar

    The list comes from the app. When it sent you to Google, it named each thing it wants, and each one is called a scope.

  3. 3 Google cuts your account into many small scopes. Seeing your calendar is one, changing it is another, reading your email is a third. Rono's app asks only for the first.see your calendarchange your calendarread your email

    Google cuts your account into many small scopes. Seeing your calendar is one, changing it is another, reading your email is a third. Rono's app asks only for the first.

  4. 4 So read that list before you tap. If some other dinner app asks to read your email, it wants more than it needs, and Cancel is right there.accounts.google.comdinnerplan.examplewants to:know your name,email and photoread youremailCancelAllowyou

    So read that list before you tap. If some other dinner app asks to read your email, it wants more than it needs, and Cancel is right there.

  5. 5 For Rono's app, you tap Allow. You give your answer on Google's page, not to the app, and Google writes it down: this person lets supperclub.example see their name, email, photo and calendar, and nothing more.Googleallowed for supperclub.examplewhowhatyouname, email, photoyousee calendar

    For Rono's app, you tap Allow. You give your answer on Google's page, not to the app, and Google writes it down: this person lets supperclub.example see their name, email, photo and calendar, and nothing more.

  6. 6 Now Google has to hand the app something that opens your calendar and nothing else, and not forever. Yet the only road back to the app runs through your browser, which keeps every address it opens in its history. What can Google send?Googlehistorysupperclub.example?

    Now Google has to hand the app something that opens your calendar and nothing else, and not forever. Yet the only road back to the app runs through your browser, which keeps every address it opens in its history. What can Google send?

  7. Quick check

    Back to the one scope you allowed.Rono's app may seeyour calendar. Can itadd a dinner toyour calendar?

    Back to the one scope you allowed.

    Show the answer

    No. Changing your calendar is another scope. The app did not ask for it, and you did not allow it.

  8. Go further

    Two names for what the consent screen does.granular consentwhen an app asks forseveral scopes, Google canput a box beside each one,so you allow some, not allapp permissionsthe same idea on yourphone, when an app asksfor your camera oryour location

    Two names for what the consent screen does.

Next episode Authorization code: what travels back through your browser after you tap Allow

Share this comic

More comics