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:
- The app sends you to the service's own sign-in page, so your password goes only to the service.
- The service shows what the app is asking for. Those requests are called scopes, such as "read my calendar" or "read my repositories."
- You approve. The service gives the app a short-lived access token, often with a refresh token that can fetch new ones.
- 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.