Skip to main content
GullySystem
A practical guide

OAuth 2.0 explained for business owners and product managers

Ganesh HSStrategy and Technology, GullySystem
Practical advice · 5 min read

In this guide 6 sections
The short answer

OAuth 2.0 lets one app act for a user inside another service without ever holding the password, because the service issues a token in its place. The user approves named permissions called scopes. A token expires, stays narrow, and the user can revoke it at any time from the provider’s account page without asking the app.

What problem does OAuth solve?

Years ago, an app that wanted your calendar asked for your Google password, logged in as you, and could read your mail, change it and keep access forever. Nobody could tell it to stop. Handing over a password is like giving a contractor your master key when all they needed was to water the plants on Tuesday.

OAuth removes the password from the exchange. You sign in on Google’s own page, Google asks whether this app may see your calendar events, and the app only ever receives a token.

This is why a booking tool can write to a customer’s calendar while knowing nothing about how that customer signs in, whether by password, passkey or company login.

The four roles in every OAuth connection

The standard names four parties. The resource owner is the person whose data it is, and the client is your app, the one asking for access to that data. The authorization server is where the person signs in and approves, while the resource server holds the data and answers every API call.

In a Google or Microsoft connection, the authorization server and resource server often belong to one company, while a smaller vendor’s product may run them as two systems. A common confusion comes from products where your company is both client and data owner, such as a staff portal reading your own Microsoft tenant.

Knowing which role is which settles most arguments. If a screen asks for a password, you are looking at the authorization server, but if a form inside your app asks for that password, something is wrong.

  • Resource owner: the customer or staff member
  • Client: your app or website
  • Authorization server: the sign-in and consent page
  • Resource server: the calendar, ledger or inbox API

Scopes are the permission slip

A scope is a single named permission, such as reading calendar events or creating invoices, and the consent screen shows each one in plain words. The person can refuse.

Ask for the smallest set that works. A scheduling feature needs to create events, not to read every contact, and wide scopes frighten users who have never heard of your company before. Some vendors send apps that request sensitive scopes through a manual review before launch, where reviewers read the scope list against your privacy policy. An unexplained scope often gets rejected.

Treat scopes as a product decision. Every extra scope is another line on the consent screen and another reason for a customer to click cancel before your feature has shown its value.

  • Read-only versus read and write
  • Calendar events versus the whole mailbox
  • Create a draft invoice versus post a payment
  • Basic profile versus full contact list

Access tokens, refresh tokens and expiry

After approval, the app receives an access token. It is a long string the app attaches to each API call, and it works for a short time, often under an hour. A leaked one soon stops working.

A refresh token lets the app request a new access token without bothering the user, and because it lasts much longer it must stay encrypted on the server. It never belongs in a browser.

Both can be revoked. When a staff member leaves, or a customer disconnects the app from their Google account page, the tokens stop working at once. Show a reconnect message, not a blank error. Plan for the quiet failures too, such as a customer who changes their Google password, which in some setups cancels every refresh token your app holds for them.

Questions to settle before building

Start with a list of every connection you want, such as calendar, accounting package and email, and for each one read the vendor’s developer documentation. Note the scopes, review rules and token lifetimes. They differ more than people expect.

Then decide who owns the connection. A token tied to one employee’s account breaks the day that person leaves, so use a service account or an admin consent where the vendor allows it. Where the vendor offers a sandbox with dummy accounts, build against that first, because testing consent screens on live customer data is how calendars get filled with junk.

Finally, write down what happens when a token fails: who is told, how the user reconnects and which screen they see, then build it in the first sprint. Do not leave it until launch week.

OAuth connection planning sheet

A planning sheet gives each connection its own row, such as Google Calendar or an accounting package, with the provider, the scopes requested and the reason for each. Further columns name the account owner, the refresh token store, the token lifetime, the review rules and the screen shown when access is revoked.

Open a blank worksheet to print

Questions owners ask

Is OAuth the same as single sign-on?

Not quite. OAuth grants an app permission to use data, while a sign-in layer on top of it, such as OpenID Connect, proves who the person is. Most continue with Google buttons use both together.

Does my app ever see the user’s password?

No. The person types it only on the provider’s own page, and your app receives tokens from which nobody can read the password, so your database never holds it.

What happens if a token is stolen?

A stolen access token dies quickly. A stolen refresh token is worse, which is why it is kept encrypted on your server and revoked the moment you suspect a leak.

Why does the provider ask us to verify our app?

Providers review apps that request sensitive scopes, checking the privacy policy, the reason for each scope and the way data is stored. Allow weeks for this in your launch plan.

Browse all guidesBack to top ↑
Next step

Have a specific situation to work through?

This article covers the general case. Tell us what you’re actually dealing with and we’ll respond directly.

Share Your Requirements