Users
End users are the people who sign in to your app through astapa. You can list them, search by email, deactivate accounts, and revoke their tokens — all from the dashboard or API.
How users are created
End users are created automatically when someone completes the hosted login flow for your project. You don't need to create them manually — just redirect users to login and we handle the rest.
Users appear after their first login
Each user belongs to one project
Google/GitHub accounts are linked automatically
List and search users
// List users (paginated)
const res = await fetch(
"https://astapa.com/api/platform/projects/1/users?page=1&page_size=20",
{ headers: { Cookie: "session=..." } }
);
const { users, total, page, page_size } = await res.json();
// Search by email
const search = await fetch(
"https://astapa.com/api/platform/projects/1/users?search=john@",
{ headers: { Cookie: "session=..." } }
);API reference
Custom claims
Custom claims are key-value pairs attached to end users. They're included in every access token, so your app can check user.claims.plan without an extra API call. See the Subscriptions docs for detailed usage.
Server-to-server claims API
If you need to set claims from your backend (e.g. after a Stripe webhook), use the server-to-server endpoint with client credentials instead of a session cookie.