Mermaid code
flowchart TD
A[Visitor clicks Sign up] --> B{Email or social?}
B -- Email --> C[Enter email and password]
C --> D[Send verification email]
D --> E{Link clicked within 24h?}
E -- No --> F[Resend or expire]
F --> D
E -- Yes --> G[Email verified]
B -- Social --> H[Redirect to provider]
H --> I{Consent granted?}
I -- No --> A
I -- Yes --> G
G --> J[Set up profile]
J --> K[Land on dashboard] Paste this into any tool that renders Mermaid, or into the editor to change the theme and export PNG or SVG. Syntax reference: Flowchart guide.
What this diagram shows
The first diamond, Email or social?, splits the flow into two branches that rejoin at Email verified. The email branch contains a loop: an unclicked link goes to Resend or expire and back to Send verification email. The social branch handles denied consent by returning the visitor to the start rather than to an error screen, which is the behavior most identity providers expect.
How to adapt it
- Add a
Captcha passed?diamond beforeSend verification emailif bot sign-ups are a problem. - Insert
Choose workspacebetweenSet up profileandLand on dashboardfor multi-tenant products. - Replace
24hwith your real link expiry and add aToo many resendsexit fromResend or expire. - Wrap the email branch in a subgraph labeled
Email pathif the diagram is going into a design review alongside screen mockups.
FAQ
Why does the denied-consent path return to the very first node?
Because the visitor has not created anything yet. Sending them back to the sign-up choice lets them try email instead, which is the fallback most providers recommend after a canceled consent screen.
How would I show magic-link sign-in without a password?
Rename Enter email and password to Enter email and let the verification email double as the login link. The loop around Link clicked within 24h? already models the retry behavior.