Skip to content
LiveNext 10:46:07

Definition

What is OAuth?

OAuth is OAuth is an open standard that lets you give one app limited access to your account on another service, through a revocable token, without sharing your password.

What it is

OAuth is the standard behind the "Sign in with Google" and "Connect to GitHub" buttons. It lets you authorize an app to act on your behalf at another service, with limits you can see and withdraw, without ever handing that app your password. Its current version is OAuth 2.0.

How it works

Four roles are involved: you, the app that wants access, the service holding your data, and an authorization server that issues permission. The usual flow goes like this:

  1. The app sends you to the service's own sign-in page, so your password goes only to the service.
  2. The service shows what the app is asking for. Those requests are called scopes, such as "read my calendar" or "read my repositories."
  3. You approve. The service gives the app a short-lived access token, often with a refresh token that can fetch new ones.
  4. The app shows the access token with each request, and the service checks it.

Because the token carries only the approved scopes and can expire or be revoked, a leak does less harm than a leaked password.

OAuth is about authorization, meaning what an app may do. A related layer, OpenID Connect, adds authentication on top, meaning proof of who you are.

Why it matters to you

AI agents and connectors depend on OAuth. When you let an assistant read your email, edit your documents or open pull requests, it usually holds an OAuth token. Protocols such as the Model Context Protocol rely on this kind of delegated access so tools can reach your accounts without storing your login.

That makes the token the thing to protect. Whoever holds it has the access you granted, until it expires or you revoke it. Store tokens with the care described in secrets management, and grant the narrowest scopes that work.

An example

You connect an AI scheduling assistant to your calendar. Google asks whether the assistant may "view and edit events." You approve, and the assistant receives a token. Later you open your account's connected-apps page, see the assistant listed, and remove it. The token stops working immediately.

What to keep in mind

Review the scopes before approving, and prefer read-only when that is enough. Check your connected apps now and then and remove the ones you no longer use. An agent with broad write access is exposed to prompt injection, so least-privilege matters more as agents get more capable.

Questions people ask

What is OAuth in simple terms?

It is a way to let one app access part of your account on another service through a revocable token, without giving the app your password.

Is OAuth the same as an API key?

No. An API key identifies an app or account, while OAuth grants an app limited, user-approved access to a person's data, using tokens that can expire or be revoked.

OAuth in the news

#04

Railway breach: attackers ran up $740K on stolen AI keys

Railway's incident report says an October attacker decrypted variables in up to about 100,000 workspaces and went after AI provider keys first, with unauthorized spend estimated at about $740,000. If your API keys sit in a host's environment variables, they are the prize now.