User Onboarding
Overview
When a new user signs up for ASD, they go through a guided onboarding flow that creates their account, sets up their profile, and establishes their first organisation. This page describes each step and the underlying mechanics.
Signup Flow
Step 1: Create an Account
Users sign up at asd.host/login using either:
- Email and password β a verification email is sent before the account is activated
- OAuth provider β GitHub, Google, or GitLab (instant activation)
Account creation is handled by Supabase Auth. On success, a row is created in auth.users.
Step 2: Verify Email
For email signups, the user receives a verification link. Clicking it confirms the email address and redirects back to ASD. OAuth users skip this step since their email is already verified by the provider.
Step 3: Create a Profile
After first login, users who do not yet have a profile are redirected to the profile creation page at /workspace/create_profile. Here they provide:
- Display name β shown in the dashboard and to team members
- Username β unique identifier used in URLs and API references
Step 4: Default Organisation
Profile creation automatically triggers the complete_profile_and_create_default_organisation database function. This:
- Creates a
profilesrow linked to the auth user - Creates a default organisation named after the user
- Adds the user as owner of that organisation
- Sets the organisation as the userβs default workspace
After this step, the user lands on their dashboard with a fully functional workspace.
What Happens in the Database
The onboarding flow touches these tables:
| Table | Action |
|---|---|
auth.users | Created by Supabase Auth on signup |
profiles | Created during profile setup |
organisations | Default org created automatically |
organisation_members | User added as owner of default org |
All of this runs inside a single database transaction via the complete_profile_and_create_default_organisation RPC function, ensuring consistency even if something fails mid-flow.
Post-Onboarding
Once onboarding is complete, users can:
- Create additional organisations from the dashboard
- Accept invitations to join other organisations (see Invitations)
- Set up tunnel credentials to start exposing local services
- Invite team members using the organisation management tools
Session Management
After onboarding, your session is maintained via a secure JWT cookie. Every request to the dashboard validates this token automatically. If your session expires, you are redirected to the login page.
Related Guides
- Getting Started β install ASD CLI and create your first tunnel
- Organisations β how multi-tenant organisations work
- Invitations β invite team members to your organisation
- CLI Commands β authenticate with
asd login