builtin.ts
shows how to use the built-in UI using the route factory method.custom.ts
shows how to build your own UI using the manual router method.
- Run
edgedb project init
and follow the prompts - Run
npm install
- Run
edgedb ui
- Click into the
edgedb
database and switch to the "Auth Admin" section (nested shield icon in the left-hand toolbar) - Enter a value for
auth_signing_key
or click the button nested in the field to generate one and click the "Update" button - Enter
http://localhost:3333/
in theallowed_redirect_urls
field and click "Update" - Switch to the "Providers" tab
- Click "Add Provider," select and configure a provider, and click "Add Provider" to save the new provider
- (Built-in only) Click "Enable" under "Login UI"
- (Built-in only) Set the value for
redirect_to
tohttp://localhost:3333/auth/callback
and click "Update"
Note: If you configured the "Email + Password" provider to require verification, the example app will need a way to send emails. You might try running Mailpit to do this for local testing. We share how in our EdgeDB Auth guide.
npm run builtin
# or
npm run custom