CollabPortals

Portal User Authentication

How portal user authentication works in CollabPortals, including the email verification flow and session management.

Overview

Portal users authenticate via email verification, no passwords, no accounts. This keeps the login process simple for end users while ensuring only authorized people can access your portal.

Authentication Flow

  1. 1

    User enters their email

    On the portal login page, the user enters their email address. This email must match a record in the portal's user table.

  2. 2

    CollabPortals validates the email

    CollabPortals checks the user table for a matching email. If no match is found, the user sees an error and cannot proceed.

  3. 3

    Verification code is sent

    A 6-digit code is sent to the user's email address. The code is valid for 15 minutes.

    The email carries your portal's name, logo, and brand color, so the person receiving it can tell who it is from. See Customizing the login email below.

  4. 4

    User enters the code

    The user enters the code on the verification screen. If correct, they're authenticated.

  5. 5

    Session is created

    CollabPortals creates a JWT session token. The user is now logged in and can access the portal.

Customizing the login email

The login code email is the one email every portal user is guaranteed to receive, so it is worth making it look like yours.

Open your portal in the admin, go to Portal Setup, then the Emails tab. You get a live preview of the email as your users receive it, plus a Send me a test button that puts a real copy in your own inbox with a sample code.

Two things you can change:

  • Email subject. Defaults to Your <portal name> login code. Leave it empty to keep the default.
  • Intro line. An optional line of context above the code, for example "Use this code to reach your supplier dashboard." Plain text, no links.

Your logo and brand color come from the Design tab, and the email picks them up automatically. Nothing on the Emails tab is required: leave both boxes empty and the email still arrives with your portal's name on it.

What you cannot change yet

The email is sent from hello@collabportals.com with your portal's name as the sender name, so it arrives as "Stockent" rather than "CollabPortals". Sending from your own address, such as login@yourcompany.com, needs domain verification and is not supported yet. Let us know if you need it.

Why No Passwords?

The email + code approach has several advantages:

  • No password management - Users don't need to remember or store passwords
  • No registration - Users don't need to create an account
  • Reduced friction - Login is fast and familiar (similar to "magic links")
  • Email-based identity - The email field in Airtable is the single source of truth

Session Management

After authentication, CollabPortals issues a JWT (JSON Web Token) that stores the user's identity:

  • Duration - Sessions last for the configured period
  • Automatic - The token is stored in the browser and sent with each request
  • Stateless - No server-side session storage needed

When a session expires, the user is redirected to the login page to re-authenticate.

Sessions are per-portal. If a user accesses multiple portals, they authenticate separately for each one.

How User Identity Works

When a portal user is authenticated, CollabPortals knows:

  1. Who they are - Their email and user table record
  2. What role they have - If roles are configured, the role field determines permissions. Someone holding several roles views the portal as one of them at a time and can switch between them; see role-based access
  3. What data they see - Records linked to their user record

This identity is used for:

  • Filtering records to show only data linked to the user
  • Applying the correct role-based permissions
  • Auto-linking new records to the user when creating

Email Field Requirements

The email field in your user table must:

  • Contain valid email addresses
  • Have unique values (no duplicate emails)
  • Use the Airtable email or singleLineText field type

If two records in the user table have the same email, authentication may not work correctly. Ensure each email appears only once in the user table.

Security Considerations

  • Verification codes expire after a short time window
  • Failed code attempts are rate-limited
  • Sessions use signed JWTs that cannot be tampered with
  • All communication happens over HTTPS

Next Steps