Docs updates.

This commit is contained in:
2025-12-19 20:37:25 +00:00
parent d25124d30b
commit a1a5ad8520
3 changed files with 17 additions and 16 deletions
+2 -10
View File
@@ -1,16 +1,8 @@
# Paskia API
## Integrating with your app frontend
For integrating Paskia with your app frontend, see [AuthFlow](AuthFlow.md).
Protect API routes with forward-auth (see [Caddy](Caddy.md)). Optionally protect your app assets and not just the API.
Catch response status 401/403 in fetch calls to protected endpoints and implement authentication flow in this case. The response is JSON and contains `auth.iframe` (a URL). [Render that URL in an iframe](AuthFlow.md) and retry the request after authentication.
While the app is in (active) use, call `/auth/api/validate` occasionally to keep the session alive (session lifetime is 24h), otherwise the user will have to login every day. Max-age limits are unaffected by this and can be used on endpoints needing to reauthenticate with passkey more frequently.
Use `/auth/api/user-info` to display user/session details, or link to `/auth/` if you prefer using the built-in profile UI and not having to anything more.
### Web Interface
## Web Interface
| Method | Path | What it is for | Notes |
|---:|---|---|---|