Auth
Sign up your app's users and check whether they are logged in. The user table lives in your project database, and default login and sign-up screens are included.
{ "auth": true }runlot deployOnce you deploy, you get the following.
env.auth, for use inside your worker- Login and sign-up screens served from your app at
/__runlot/auth/*
const user = await env.auth.user(request);
if (!user) return Response.redirect("/__runlot/auth/sign-in");Auth is not access control
| Feature | What it does | Who it applies to |
|---|---|---|
| Auth (this page) | Identifies your app's users through env.auth | Your app's users |
| Access control | Limits who can reach the deployment itself | Your team, anyone who knows the password, or every visitor |
For example, showing a pre-launch deployment only to members of your organization is access control. Identifying which user is logged in to the app inside that deployment is auth. The two are independent of each other.
The user table lives in your project database
User records are stored in the runlot_auth schema of your project database. You can query them with psql or join them against your own tables.
select id, email, created_at from runlot_auth.users order by created_at desc limit 20;Passwords and session tokens are stored only as hashes.
In this section
Getting started
Operating
Reference