CollabPortals

Portal User Authentication

How portal users sign in: the email and 6-digit code flow, signing in on the email alone, letting people register themselves, sessions, and the login email.

Overview

Portal users sign in with their email address. There are no passwords to set up or forget. By default, a person types their email, gets a 6-digit code by email, and types the code in. Only people already in your user table can get in.

You can change this in three ways. All of them are on the Login tab (open Settings in the editor sidebar, then Login), and none of them applies until you change it:

  • Require an email login code, switched off, signs a person in on their email address alone. See Signing In Without a Code.
  • Allow self-registration lets someone who is not in your user table create their own record from the login screen. See Self-Registration.
  • Make this portal public lets people browse without signing in at all. See Making a Portal Public.

Authentication Flow

This is what your users see when they sign in with the default settings.

  1. 1

    They enter their email

    On the portal's login page, the person types their email address and clicks Send login code. The address must match a record in your portal's user table. If it does not, they see an error and cannot go further, unless self-registration is on, in which case they can sign up instead.

    A portal login screen with an email address typed into the email box and a Send login code button below it
    The login screen. People type the email address held in your user table.
  2. 2

    They get a code by email

    CollabPortals emails them a 6-digit code. The code works for 15 minutes. The email carries your portal's name, logo and brand color, so they can tell who it is from. See Customizing the login email below.

  3. 3

    They enter the code

    They type the code into Enter 6-digit code and click Verify code. They are now signed in and land on the portal.

    The portal sign-in card asking for the code, with an Enter 6-digit code box and a Verify code button
    After the email arrives, people type the 6-digit code here. It works for 15 minutes.

Customizing the login email

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

  1. 1

    Open the Emails tab

    In the editor sidebar, open Settings, then the Emails tab. You get a live preview of the email as your users receive it.

    The Emails tab in the portal editor, with Email subject, Preview text, Heading and Intro line boxes, and below them a live preview of the login email with Refresh and Send me a test buttons
    The Emails tab. Each empty box uses the standard wording shown in grey, and the preview updates as you type.
  2. 2

    Change the wording you want

    Each box shows the standard wording in grey. Leave a box empty to keep it. From top to bottom, as the recipient reads it:

    • Email subject. Defaults to Your <portal name> login code.
    • Preview text. The line an inbox shows beside the subject. It is only used when you have not set an intro line. When you have, inboxes preview the intro instead.
    • Heading. The line at the top of the email, Sign in to {portal} by default. {portal} is replaced with your portal's name.
    • Intro line. An optional line of context above the code, for example "Use this code to reach your supplier dashboard." Plain text, no links.
    • Code caption, expiry line and ignore line. The words around the code: "Your login code", This code expires in {minutes} minutes., and "If you did not try to sign in, you can ignore this email."
  3. 3

    Save, then send yourself a test

    Press Save, then click Send me a test. A real copy arrives in your own inbox with a sample code.

Your logo and brand color come from the Design tab, and the email picks them up on its own. Nothing on the Emails tab is required: leave every box empty and the email still arrives with your portal's name on it. Together with the portal's Labels tab, this is enough to send the login email entirely in your users' language.

A branded login code email in French, headed Connexion à Maintenance Portal, with the code caption Votre code de connexion above the code
A login code email with its wording set on the Emails tab, here in French. The logo and brand color come from the Design tab.

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.

Signing In Without a Code

On the Login tab, switch off Require an email login code. The person types their email and clicks Continue. If the address matches a record in your user table, they are signed straight in.

The Require an email login code switch turned off, with a warning that anyone with a user's email can log in as them
Switching the code off shows this warning. Only do it where the data is not sensitive.

This removes the only check that the person owns the address. Anyone who knows a user's email can sign in as them. Use it only where the data is not sensitive and a code is more hassle than it is worth. The editor shows the same warning when you switch it off.

Everything else works the same: sessions, roles, permissions and which records each person sees.

Self-Registration

On the Login tab, switch on Allow self-registration. A Sign up button appears on the login screen. A visitor fills in a short form, confirms their email with a 6-digit code, and CollabPortals then creates their record in your user table. You no longer have to add each person in Airtable first.

The code step always happens on sign-up, even if you have switched off Require an email login code. The record is only created once the code is confirmed.

The Allow self-registration switch turned on, with a rich text box below it labelled Text above the Sign up button
Self-registration on, with a notice that appears above the sign-up form's Sign up button.

What goes on the form:

  • An Email box, always.
  • The fields your Default role can create on the user table, in your field order. Turn Create on for a field on the user table's Fields tab to add it.
  • Never linked record or attachment fields, whatever their permissions, because both need a signed-in portal to work.
A portal sign-up form with a required Email box, Name and Phone boxes from the user table, a Sign up button and a Back to login link
The sign-up form. Email is always there; Name and Phone are fields the Default role can create on the user table.

A notice above the Sign up button

Under the switch is a rich text box, Text above the Sign up button (Optional). What you write appears on the sign-up form, below the fields and directly above the form's Sign up button. That is where someone has to read an agreement before accepting it.

It takes headings, bold, lists and links. Use it for terms a visitor is agreeing to, who the portal is for, or a link to an agreement you host elsewhere. Links open in a new tab, so someone who opens your terms does not lose what they have typed.

When a visitor has to confirm they have read it, add a checkbox field to your user table and set it to Required for your Default role. A required checkbox left unticked is refused by the server, not only by the browser.

Your wording is kept when you switch self-registration off, so turning it back on brings the notice back too.

Why No Passwords?

  • Nothing to remember. Users do not need to create, store or reset a password.
  • Fast and familiar. It works like the "email me a code" sign-in many apps already use.
  • Airtable stays in charge. The email field in your user table decides who can get in. Remove someone there and they lose access.

Session Management

Once signed in, a person stays signed in on that browser for a while, so they do not need a new code on every visit.

  • How long. By default, about 7 days after their last visit. Each visit renews it, at most once a day, so someone who uses the portal every few days rarely has to sign in again. Because renewal is daily, the real window can be up to a day shorter than the setting.
  • Changing it. On the Login tab, Signed-in cookie duration sets the length: 1, 7, 14, 30 or 90 days. Pick a shorter time if your portal is used on shared computers. A shorter length applies to people already signed in on their next visit. A longer one applies within a day of their next visit.
  • Every sign-in method is the same. Signing in with a code and signing in on the email alone give the same session.

When a session ends, the person is sent back to the login page. Someone you remove from the user table cannot keep their session going: every page they load checks they are still there.

Each browser and device has its own session, so someone who uses their phone and their laptop signs in once on each.

A session belongs to one portal and gives no access to any other. But a browser holds one sign-in per website, so signing in to a second portal on www.collabportals.com replaces the first sign-in rather than running alongside it, and going back to the first portal means signing in again. Portals on their own custom domains are separate websites, so their sign-ins sit side by side.

How User Identity Works

Once someone is signed in, CollabPortals knows:

  1. Who they are. Their email and their record in your user table.
  2. What role they have. If you use roles, their role field decides their permissions. Someone holding several roles views the portal as one of them at a time and can switch. See Role-Based Access Control.
  3. Which records are theirs. On a table set to "Only their own records", they see the records that belong to them. See Record Ownership.

That identity is also used to link a new record to the person who created it.

Email Field Requirements

The email field in your user table must hold valid email addresses, and each address should appear on only one record.

Almost any field type that holds text can be the email field, not just Airtable's Email and Single line text types. Formulas, rollups, lookups, synced fields, long text, phone, URL and single select all qualify, so an address built by a formula is fine. The User Email Field picker on the Setup tab only leaves out types that cannot hold an address: numbers, currencies, percentages, dates, checkboxes, ratings, durations, counts, attachments, buttons, multiple selects, collaborators, linked records and auto numbers.

Nothing stops the same address being on two records. If it is, the person is signed in as whichever record Airtable returns first, which may not be the one you expect. Keep the addresses unique.

Security Considerations

  • Login codes expire 15 minutes after they are sent.
  • Asking for a new code replaces the old one, so only the latest code works.
  • After 5 wrong codes for the same portal and email address, the code stops working and the person has to ask for a new one.
  • Sessions are signed so they cannot be tampered with, and all traffic uses HTTPS.

Note that asking for a code is not limited on the default flow, only entering one. Someone who knows an address can therefore cause codes to be sent to it.

Next Steps