Documentation Index
Fetch the complete documentation index at: https://docs.edgespark.dev/llms.txt
Use this file to discover all available pages before exploring further.
auth gives you access to the current authenticated user. Import it from edgespark/http in your server code.
auth.user
The authenticated user object is available in protected routes:
server/src/index.ts
auth.isAuthenticated()
Use auth.isAuthenticated() when you want a type-safe guard in routes that allow anonymous access:
server/src/index.ts
When user is available
| Route pattern | auth.user |
|---|---|
/api/* | Always a valid user |
/api/public/* | User if logged in, otherwise null |
/api/webhooks/* | Always null |
See also
Authenticate users
Guide to protected routes, optional auth, and webhook verification.
Path-based auth
How URL path conventions control authentication behavior.