Sign-in flows
The Sign-in flows page shows what happens between someone proving who they are and being signed in, and lets you add your own steps.
Journey map
Section titled “Journey map”The Journey map tab is available on every plan. It shows each way someone can get into your project with your current settings: signing in or up with a password, passkeys, sign-in links by email, each social or enterprise connection, resetting a forgotten password, and confirming who they are.
Each screen in the map is a live preview of the real page in your design, and you can select one to see it larger in light or dark mode. Steps that only appear for some people, such as two-step verification for those who’ve set it up, are marked as such.
Builder
Section titled “Builder”On the Paid plan, the Builder tab lets you change four flows:
| Flow | Runs |
|---|---|
| Signing in | After someone proves who they are, before they are signed in. |
| Signing up | After a new account is created. |
| Confirming it’s you | When an application asks someone already signed in to prove it again, or before a sensitive change on their account page. |
| Resetting a password | Before a new password is accepted. A switch asks for the second step first, which is recommended. |
Each flow is drawn as a chart that runs from top to bottom. Use + to add a step, and select a step to change it.
| Step | What it does |
|---|---|
| Two-step verification | Always present, exactly once, and outside any If, so no path can skip it. You can make it required for some sign-ins. |
| Form | Asks for profile details, either every time or only while a field is still missing. You can let people skip it. |
| If | Sends sign-ins that match its condition down the Yes path and the rest down No. Both paths join up again afterwards. You can put Ifs inside each other, up to four deep. |
| Require two-step verification | Makes this sign-in complete the second step, whatever your policy says. It has to come before the two-step verification step. |
| Update the user | Sets attributes and adds or removes roles and groups. The changes are checked like any other change. |
| Set a variable | Stores a value that later conditions and messages can use. |
| Call your API | Asks your own server, which can refuse the sign-in, set variables or change the user. See below. |
| Send an email | Emails the person at their confirmed address, no more than once in a period you choose. |
| Refuse | Stops the sign-in and shows your message. |
Conditions
Section titled “Conditions”An If step, and the optional condition on a form or on the two-step verification step, can check how the person signed in (password, passkey, sign-in link, or a social or enterprise account), which application they’re signing in to, their roles and groups (including roles that come from groups), the country the request comes from, their email domain, and the values of attributes and variables (whether they’re empty, set, equal to something, or not equal to it).
If you check more than one kind of thing, all of them have to match. Within one kind, such as a list of roles, any one of them is enough.
Text with details filled in
Section titled “Text with details filled in”Messages, emails and values can include details about the sign-in:
| Placeholder | Value |
|---|---|
{{user.email}}, {{user.id}} |
The person |
{{user.attributes.given_name}} |
A standard attribute |
{{user.custom.company}} |
A custom attribute |
{{app.name}}, {{app.id}} |
The application |
{{project.name}} |
Your project |
{{country}} |
Where the request comes from |
{{vars.name}} |
A variable |
Placeholders are filled in as plain text, and nothing in them is ever run as code.
Call your API
Section titled “Call your API”This step sends a POST request to an HTTPS address of yours. It’s signed in the same way as a webhook, using the project’s signing secret, and the body looks like this:
{ "type": "flow.call_api", "flow": "login", "step": "check-subscription", "user": { "id": "…", "standard_attributes": { "email": "…" }, "roles": [] }, "app": { "id": "…", "name": "Shop" }, "country": "GB", "vars": {}}Your server should answer within the step’s time limit (between 1 and 10 seconds) with either of these:
{ "action": "continue", "vars": { "plan": "pro" }, "user": { "roles": ["member"] } }{ "action": "refuse", "message": "Your subscription has lapsed." }Anything in vars becomes a variable that later steps can use, and user changes the user in the same way as a blocking hook can. If your server doesn’t answer in time, or sends something that can’t be read, the sign-in is refused, unless you’ve set the step to carry on regardless.
Recent runs
Section titled “Recent runs”Each time one of your flows runs, the audit log records which steps it went through, which way each If went, and how it ended. Choose a run under Recent runs to see the path it took on the chart.