Skip to content
Engineering

OAuth

Definition

OAuth is an open standard for delegated authorization. It lets a user give an app limited access to their data on another service, such as their Google Calendar, without sharing their password, using scoped tokens that can expire or be revoked.

Diagram

The OAuth authorization code flowYou click connect calendar. The app sends you to the calendar provider, where you sign in and approve access to your events. The provider redirects back to the app with a one-time code, which the app exchanges, with its own secret, for an access token limited to your calendar. The app then uses that token. Your password only ever goes to the provider.YouScheduling appCalendar provider1. Click “Connect calendar”2. Send you to the provider, asking for calendar access3. Sign in there and approve “read and edit events”4. Redirect back with a one-time code5. Swap the code (plus the app’s secret) for a token6. Access token: calendar only, expires7. Use the token to read your events
Step 3, in green, is the point: your password goes only to the provider, never to the app. The app gets a token limited to what you approved, which you can revoke at any time without changing your password.

Worked example