Discover
Read the issuer metadata and learn which endpoints and scopes are available.
A calm, standards-based path from consent to identity.
Build login with a provider your users already trust. This page is a working public-client example built on OAuth 2.1, OpenID Connect, and S256 PKCE.
Live OAuth playground
Public client · S256 PKCE
Use a public client with token_endpoint_auth_method set to none. Never paste a client secret here.
Register this exact URL on the OAuth client. For this page, use the current page URL.
What the client receives
The flow
The protocol does the heavy lifting. Your app keeps the state, verifies the response, and decides what to do with the identity.
Read the issuer metadata and learn which endpoints and scopes are available.
Send the user to Deni AI with a one-time state value and S256 PKCE challenge.
Trade the one-time authorization code for access and refresh tokens.
Call UserInfo with the access token and create the app session.
A small client surface
The example separates browser state, authorization, token exchange, and identity lookup so each security decision is visible in code review.
const discovery = "/.well-known/openid-configuration";
const authorize = "/api/auth/oauth2/authorize";
const token = "/api/auth/oauth2/token";
const userInfo = "/api/auth/oauth2/userinfo";Protocol surface
/api/auth/oauth2/authorize/api/auth/oauth2/token/api/auth/oauth2/userinfo/.well-known/openid-configurationSupported scopes: openid, profile, email, and offline_access. Register a public client with an exact callback URL before starting the live flow.