Device Code Flow Playground
This playground implements a complete Device Code Flow. Request a device code, authenticate at the verification URL (simulating the "second screen"), and receive a signed JWT. Useful for testing CLI tools, IoT device auth, and Snowflake External OAuth integrations.
Solve the captcha to activate the API for your session (10 minutes). This prevents bots from abusing the demo endpoints.
Use these scripts to interact with the API programmatically. The session token from the captcha is required for all requests. Your session token: --
Complete device code flow — request, poll, receive token. Requires: pip install requests
Validate a received token against JWKS or a public key. Requires: pip install PyJWT cryptography
Quick test with curl.
Choose how the JWT will be signed. Server mode uses the blog's RSA key -- validate tokens against the JWKS endpoint. Client mode generates keys in your browser for fully offline signing.
Tokens are signed by the blog's RSA key. Validate against:
Generating RSA-2048 key pair in your browser...
Click below to request a device code. You'll get a user code and a link to the verification page. Open the link in a new tab (or on your phone) and enter the code there.
Open the verification URL and enter this code:
Exchange your bearer token for a demo AES encryption key. This demonstrates a protected API endpoint that validates the JWT before returning sensitive material.
For testing and demos only. The server's RSA key regenerates on restart. Device codes expire after 10 minutes. Tokens expire after 1 hour. No data is stored permanently. In production, use a real Identity Provider (Okta, Entra ID, Auth0) for device code flows.