Redirect and code flow
Redirect URIs rejected as unregistered, testing callbacks locally, and why implicit flow and the password grant are unsupported.
The redirect URI keeps being rejected as unregistered
Check three things:
- Does it have a non-root path —
https://example.comfails,https://example.com/cbworks; - Is the scheme
https— only loopback addresses may usehttp; - Does it contain a query string or
#fragment — neither is allowed; it must match the registered value verbatim.
The redirect_uri in the authorization request must match the registered value exactly; one extra slash is rejected. See Redirect URI policy.
Testing callbacks locally
Use a loopback address: http://127.0.0.1:port/callback or http://localhost:port/callback. Only loopback may use http; everything else must be https. Register that loopback address as its own client rather than mixing it with the production address.
Why implicit flow or the password grant is unsupported
Third-party applications have exactly one path: authorization code + PKCE (S256). Other flows are rejected outright.
- The implicit flow puts tokens in the URL fragment, where they leak into logs and browser history;
- The password grant requires the application to handle user passwords, violating the premise that an application should never see credentials.
Can an authorization code be reused
No. Codes are single-use and die once exchanged. Reuse yields invalid_grant; see Token exchange and refresh.
Related
- Full flow steps: Authorization code flow
- Redirect URI matching rules: Redirect URI policy
Registering a client
How to obtain a client_id, confidential vs public clients, whether client_secret may live in the frontend, and why the developer platform is not live yet.
Token exchange and refresh
Investigation order for invalid_grant, why refresh tokens stop working, why scopes go missing, and whether to validate with jwks or introspect.