RFC 8252 / START HERE
OAuth for native apps, before the details
OAuth for native apps
A native app is software installed on a phone or computer. This RFC explains how those apps should ask for OAuth permission using a separate browser.
The idea in one picture
An installed app asks
A browser handles approval
The result returns to the app
A simplified picture of the idea; the chapters explain the actual mechanisms.
Why it exists
An app-controlled login screen could inspect what you type. An external browser keeps the authorization service's sign-in experience separate from the app.
A familiar example
A desktop app opens your browser to connect a cloud account, then receives a callback after you approve access.
Helpful background
You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.
What you’ll learn next
Begin with chapter one, or choose a topic.
- Leave login to the browserThe app delegates authentication to a separate browser security context.→
- A browser round trip, protected by PKCEProof Key for Code Exchange (PKCE) lets an installed app prove it knows a fresh secret when exchanging a code.→
- Private-use callback schemesA domain-based custom URI scheme lets the operating system return a code to an installed app.→
- Claimed HTTPS callbacksThe operating system can associate a domain’s HTTPS links with its verified app.→
- Loopback callbacks on desktopA temporary local listener can receive the browser’s authorization response.→
- Register the full callbackRecord a native app’s client type and exact redirect URI, including its path.→
- Bind the response to the app’s requestA callback arriving on the device must correspond to an outstanding authorization request.→
- Fake browsers and client impersonationA malicious app can mimic a browser or attempt to become the default HTTPS handler.→
- Server support and implicit-flow limitsSupporting native apps means more than accepting one mobile callback format.→
This introduction explains RFC 8252 (2017). Read the original RFC ↗