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 Refresh token: how an app keeps working when you are not there

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

PKCE: how a phone app signs you in with Google when it cannot keep a secret

Anyone who downloads a phone app can look inside it, so a phone app cannot keep a secret. How does it still sign you in with Google safely?

  1. 1 So Rono starts on the phone app. But anything inside a phone app can be read by anyone who downloads it and takes it apart, and a client secret put in there would be a secret for nobody.client secretanyone can look inside

    So Rono starts on the phone app. But anything inside a phone app can be read by anyone who downloads it and takes it apart, and a client secret put in there would be a secret for nobody.

  2. 2 And on its way back from Google, the code passes through your phone, where another app that answers to the same return address could catch it. With no secret to check at the trade, a caught code would be as good as the real thing.Googlesupperclubcode: x9F2another app?

    And on its way back from Google, the code passes through your phone, where another app that answers to the same return address could catch it. With no secret to check at the trade, a caught code would be as good as the real thing.

The rest of this episode is for subscribers

Subscribe to read every premium episode. You can cancel when you want.

Paid yearly: $99 instead of $119.88

Next episode Sign in with Google or a password: what an app can and cannot do with your account

Share this comic

More comics