Docs: add a browser SPA integration example #31
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/anz#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
The README's Quick Start walks through a server-side OIDC integration (Forgejo-style:
anz client add ... [--secret], server validates tokens). Since anz now supports browser SPAs (cors_allowed_origins, PKCE-only public clients), there's a second integration mode that has no example anywhere in the docs.Encountered
The navinote PWA was the first browser SPA consumer. Several non-obvious things had to be figured out from source/spec:
--secret) so PKCE is enforced.cors_allowed_origins = ["https://your-app.example.com"]inanz.toml./.well-known/openid-configurationcross-origin (CORS-bound), navigate to/authorize(not a fetch, so no CORS),POST /tokencross-origin withcode_verifier(CORS-bound), refresh tokens cross-origin.client_id(see #30).Proposed
A short section in the README — "Integrating a browser SPA" — covering:
cors_allowed_origins.aud.Doesn't have to be exhaustive — pointer to a working reference (e.g. navinote's
pwa/src/lib/auth.js) is fine.Why now
We don't know whether another SPA will integrate soon. If the answer is "no", this is low priority. If the answer is "expected within the year", the README section pays for itself.
#32