
Explore the fundamentals of OAuth 2.0 and OpenID Connect, navigate the specs maze, and learn to build secure applications while protecting APIs with token lifetimes and scopes.
Explore the shift from http basic auth to oauth 2.0, highlighting bearer tokens and the split between authorization and api servers for secure mobile and web apps.
Discover how OAuth 2.0 enhances application security by redirecting password entry to the OAuth server, reducing user exposure and enabling scalable MFA across apps.
Explore how OAuth enables API access with access tokens, while OpenID Connect adds user identity via ID tokens.
Explore the five OAuth 2.0 roles—the resource owner, user agent, OAuth client, resource server, and authorization server—and how the authorization server issues access tokens for api access.
Examine confidential and public clients in OAuth 2.0, why credentials matter, and how client authentication influences consent and token lifetimes while reducing risk.
Explore how user consent and redirect-based OAuth flows protect data, replacing password grants with an authorization server that supports multifactor authentication and clear consent prompts.
Compare the front channel and back channel in oauth flows, highlighting secure back-channel delivery versus front-channel data, why implicit flow is discouraged, and the role of user consent and cors.
Understand application identity in OAuth 2.0, including client IDs, optional client secrets for confidential vs public clients, and the authorization code flow with PKCE and redirect URIs.
Explore how to build OAuth clients across web server, mobile, single-page apps, and devices without browsers, with practical flows and demos, and understand OpenID Connect differences for client developers.
Register your application on the OAuth server to obtain the client ID and possibly a client secret, configure redirect URLs, and prepare for the authorization code flow.
Explore the full authorization code flow for web apps with PKCE, front and back channel exchanges, code verifier and challenge, token exchange, and refresh tokens.
Examine the unique issues of native apps in OAuth 2.0, showing why mobile apps cannot safely use a client secret and that the solution is not to use one.
Learn how mobile redirect URLs differ from web redirects, including custom URL schemes and deep linking, and how PKCE and app-claimed URL patterns enhance security in OAuth 2.0.
Learn how mobile apps securely launch in-app browsers for OAuth 2.0, using SFSafariViewController and Chrome Custom Tabs to keep users in-app while preserving password safety and session sharing.
Explore the authorization code flow for native apps using PKCE to securely obtain access tokens via front and back channels, with a focus on mobile-specific considerations.
Leverage refresh tokens to keep mobile users logged in with short-lived access tokens. Post to token endpoint with grant_type=refresh_token, refresh token, and client id; native apps omit a client secret.
Explore browser-specific challenges for OAuth in single-page apps, including public clients, XSS risks, third-party scripts, and insecure storage, and learn PKCE's secretless flow.
Learn the authorization code flow for single-page apps with PKCE, using no client secret, front and back channels, and exchanging authorization codes for access tokens.
Learn how single page apps protect OAuth 2.0 tokens in the browser, including PKCE benefits and storage options like localStorage, sessionStorage, and cookies against cross-site scripting.
Move the OAuth flow and token storage to a dynamic backend to keep tokens out of the browser, using HttpOnly cookies and back-channel exchanges.
Learn the OAuth device flow for devices without browsers or keyboards, like smart TVs and IoT, using a code and url to authenticate on another device and poll for tokens.
Explore the OAuth device flow for browserless devices, detailing the roles, device and user codes, polling, login prompts, and token refresh to secure API access.
Explore the client credentials grant, a machine-to-machine flow that exchanges app credentials for an access token without user involvement, enabling scalable backend access.
Register your application with the OAuth server to obtain a client ID and secret for machine-to-machine use, then request an access token at token endpoint using the client credentials grant.
Explore how OpenID Connect adds the ID Token to OAuth, a JSON Web Token that carries user information with header, payload, and signature, including issuer, audience, iat, exp, and sub.
Differentiate access tokens from ID tokens in OAuth 2.0: access tokens are opaque to apps, while ID tokens are JWTs read and validated by the app.
Obtain an ID token with an access token via the authorization code flow by adding openid, then exchange the code on the back channel to receive the ID token.
Explore hybrid OpenID Connect flows and how code, id_token, and code+id_token responses affect security. Learn why PKCE strengthens the authorization code flow and mitigates front-channel token risks.
Validate ID tokens by verifying the signature and essential claims (issuer, audience, timestamps, nonce); front channel flows require checks, while the authorization code flow provides a trusted back channel.
Explore protecting an api with OAuth from the api perspective, focusing on access token formats, token lifetimes, and defining scopes for secure access.
OAuth 2.0 has become the industry standard for providing secure access to web APIs, allowing applications to access users' data without compromising security. Companies around the world add OAuth to their APIs to enable secure access from their own mobile apps and third-party IoT devices and even access to banking APIs.
Security expert Aaron Parecki breaks down each of the OAuth flows (grant types) and applies them to use cases such as implementing OAuth for web apps, native apps, and SPAs. In addition to learning how applications can use OAuth to access APIs, you’ll learn how to use OpenID Connect to get the user’s identity.
If you're building an API, you'll learn the differences and tradeoffs between different access token formats, how to choose an appropriate access token lifetime, and how to design scopes to protect various parts of your APIs.
This course includes the latest recommendations from the OAuth working group including covering everything from using PKCE for all types of applications to explaining the motivations behind dropping the Implicit and Password grants from the spec. These security recommendations and more will be rolled up into the new OAuth 2.1 update, so this course will give you an excellent head start on learning the best way to use OAuth going forward!
By the end of this course, you’ll understand:
The problems OAuth was created to solve
The basics of OAuth 2.0 and OpenID Connect
Best practices for developing web-based and native OAuth apps
The difference between local and remote access token validation
How to validate JWT access tokens
And you’ll be able to:
Implement an OAuth client from scratch
Protect the OAuth flows in native and JavaScript apps
Use OpenID Connect to get the user’s name email address
Protect an API with OAuth access tokens
Design scopes to protect various parts of your API
This course is for you because...
You’re a software architect, application developer, or technical decision maker
You work with APIs, web apps, mobile apps, or microservices
You want to deepen your understanding of application security and become a technical leader
Prerequisites
A basic understanding of HTTP requests, responses, and JSON
No programming language knowledge is necessary since the exercises can be completed without writing any code!
To follow along with the exercises, you'll also need:
Experience with Postman, curl, or any other HTTP client
A free Auth0 Developer account
This course also gives you exclusive access to an interactive web-based tool that will guide you through the exercises and give feedback along the way! It's like having the instructor provide real-time feedback as you are working through the exercises!