
OAuth Explained: How Apps Get Access Without Your Password
Imagine connecting a scheduling app to your calendar. The app needs to find available meeting times, but giving it your calendar account's password would also hand over a credential you use for much more. You want to authorize a useful task while keeping control of the account.
OAuth 2.0 provides a framework for that delegated access. A service can issue an app a token representing permission to make certain requests, without giving the app your password. The important questions then become what the permission covers, how long access lasts, and what happens when you disconnect.
Access and sign-in answer different questions
Authentication establishes who is signing in. Authorization determines what an app or person may do. Connecting a calendar involves both, but they are separate decisions.
You might authenticate to your calendar provider using a password or a passkey that proves you can sign in. The provider can then handle a request to let the scheduling app read calendar information. Proving your identity does not automatically mean you intended to share your calendar.
OAuth addresses authorization. OpenID Connect, often shortened to OIDC, adds an identity layer on top of OAuth 2.0 for sign-in. It supplies an ID token containing claims about the authentication and user, which the receiving app must validate.
An access token serves a different purpose: it lets an app call a protected service. An ID token is not a general-purpose substitute for an API access token. A sign-in button and a calendar connection can appear in the same product while requesting different information and permissions.
Who is involved when you connect an account?
The calendar example has four roles:
- You, the resource owner, can authorize access to your calendar information.
- The scheduling app, the client, requests that access.
- The authorization server handles the authorization process and issues tokens.
- The resource server provides the calendar API and enforces access to its data.
One provider can operate both servers. Separating the roles helps explain why permission is granted in one place and checked when another system receives a request.
The scheduling app's own account is another consideration. You may already be signed in to that app before linking a calendar. Disconnecting the calendar does not necessarily delete your scheduling account or end its session.
Follow an authorization code through the connection
A common modern approach uses the authorization code flow with Proof Key for Code Exchange, or PKCE.
The app starts a connection request and directs your browser to the provider. That request identifies the client, asks for particular permissions, and specifies a registered return address. You authenticate with the provider if needed. The provider handles approval according to its policies; a previously approved connection or an organization's policy may mean there is no fresh consent screen every time.
After approval, the provider returns a short-lived, single-use authorization code to the app's return address. The app exchanges that code at the token endpoint for an access token. It can then present the token to the calendar API.
PKCE ties the exchange to a secret generated for that transaction. The app initially sends a challenge derived from the secret, then supplies the matching verifier during the code exchange. Someone who captures the code alone cannot redeem it without the verifier.
These steps still require careful implementation. Redirect validation, transaction binding, and token protection matter. Current OAuth security guidance requires PKCE for public clients, such as apps unable to keep a shared client secret confidential, and recommends it for confidential clients too.
Scopes define the requested permissions

A scope is a permission label defined by the service. A provider might offer separate permissions for viewing availability, reading event details, or changing events. Those are different capabilities even when all are described casually as calendar access.
There is no universal set of scope names or guaranteed level of detail. A permission might cover many calendars or files. Another service might support a narrower resource selection. Read the actual permission description rather than assuming the app can see only the item currently on screen.
The illustration represents a limited boundary; it does not imply OAuth always provides a separate permission for every file.
For the hypothetical scheduling app, availability information might be sufficient. Reading full event descriptions could expose information unrelated to arranging a meeting. Editing events adds a further capability that needs its own justification.
This is the least-privilege principle behind zero trust security: grant the access a task needs and enforce that boundary. A read-only connection can still disclose sensitive information, even though it cannot change the original records.
Tokens remain valuable credentials
Keeping your password out of the scheduling app is useful, but the access token still carries authority. With a bearer token, possession is enough to use it within the token's permitted access. A stolen token can therefore matter even when the attacker never learns your password.
Applications must protect tokens in storage and transit. Pasting one into a support message, putting it in a URL, or recording it in an exposed log can leak access. Some systems bind tokens to additional cryptographic proof, but that protection should not be assumed from the word OAuth alone.
An access token can expire. If the provider also issues a refresh token, the app can use it with the authorization server to obtain replacement access tokens without asking you to approve each routine request. Refresh tokens are optional, and their lifetimes and invalidation rules depend on the service.
This explains why an integration can keep working after you close its browser tab. The connection may support continuing access in the background. Closing a window is not a reliable way to revoke it.
Disconnecting stops access; copied data needs separate attention

When you no longer need the integration, review the provider's connected-app settings and remove its access. An app may also offer a disconnect action that revokes tokens. Simply signing out of the app is a different operation.
Revocation behavior depends on the provider and token arrangement. Invalidating a refresh token can stop new access tokens being issued, while treatment of related access tokens and propagation between servers follows the service's implementation. Avoid assuming every existing session ends at exactly the same moment.
There is a separate limit: removing access cannot pull back information the app already copied. Calendar details imported into the scheduling service may remain there under its retention and deletion policies. Deleting that information may require action within the scheduling service itself.
For connected AI tools, the same permission deserves attention. Our prompt injection explainer describes how an assistant can be redirected through material it reads. OAuth can limit the resources available to an integration; it does not decide whether every action taken within that access matches your intent.
Read the connection request as a concrete decision
Before approving an integration, identify the account, the receiving app, the information it can read, and the actions it can take. Compare those permissions with the feature you actually want. If a meeting-time tool requests unrelated capabilities, pause and look for an explanation or a narrower connection.
After connecting, know where the provider lists authorized apps and how the receiving app handles imported data. Review those connections when a trial ends, a workflow changes, or a tool is no longer useful.
OAuth makes delegation possible without sharing your main password. Using it well means treating the resulting permission as a specific grant of access that you can understand, review, and eventually remove.
The illustrations for this article were generated with AI.