Skip to content
Glossary · Identity and security

OAuth 2.0

Also called OAuth.

Definition

A standard that lets an app get limited access to a user's account on another service, without ever seeing their password.

Last updated

What it is.

OAuth 2.0 is defined in IETF RFC 6749. When you click Connect your calendar, you are sent to the calendar provider, you log in there and approve a set of permissions called scopes. The provider then gives the app an access token that works only for those scopes, for a limited time.

OAuth is about authorisation: what an app may do. It is often paired with OpenID Connect, a layer on top that adds identity, which is what Sign in with Google uses. For enterprise logins, SAML is the other common standard.

Why it matters

Any product that connects to other tools, such as calendars, CRMs, accounting software or payments, will use OAuth. It is also how your own API can let partners act for your users safely. Getting it wrong leaks tokens, which can be as bad as leaking passwords.

In a product build

We use the authorisation code flow with PKCE for web and mobile apps, ask for the narrowest scopes, store tokens encrypted on the server and handle refresh and revoke from day one. Expired or revoked tokens show a clear reconnect message, not a silent failure.

Watch out

Common mistakes.

  1. 01

    Asking for broad scopes up front. Users refuse, and a leaked token can do more damage.

  2. 02

    Storing tokens in browser local storage where any injected script can read them.

  3. 03

    Treating an access token as proof of who the user is. That is what OpenID Connect is for.

Sources

Read the official text.

Primary sources this definition is based on.

Tools

Work it out with a tool.

Related

Related terms.

Building something with this? Ask an engineer.

OceanLab designs and builds production software. Tell us what you are planning and we will reply with how we would approach it.

OceanLab

Enterprise Software Engineering - Human + AI

Languages

Locations

Global Headquarters

21 Merchant Road, 3rd Floor, Singapore 058267

Main corporate office and leadership operations

North America Office

548 Market Street, PMB 12472, San Francisco, CA 94104

Client operations and business development

India Office

402 Shivalik Shilp II, SG Highway, Ahmedabad 380015

Engineering and delivery center

© 2026 - Copyright. All Rights reserved OceanLab