Skip to main content
ClientNest365

Authentication and security

Magic-link auth for client portals: skip the password

Magic-link sign-in for client portals: how it works, why it suits low-friction client access, where it doesn't, and how to implement it well.

By ClientNest365 team · Published · Updated · 6 min read

One of the most common reasons client portals go unused isn't price or features. It's the password.

The client gets an email saying "your portal is ready, click here to set up your account." They click. They land on a form asking for a strong password. They invent something. They never write it down. Three weeks later, the firm sends them a file through the portal. They click the email, can't remember the password, hit "forgot password," lose the reset email in their spam folder, give up, and ask the firm to send the file by email instead.

Multiply that by 50 clients and the portal is dead.

Magic-link sign-in avoids this. This article explains how it works, why it's a sensible default for client-facing portals, and the cases where it's not the right answer.

How magic-link auth actually works

A magic link is a single-use URL the firm emails to the client. Open the link, confirm, and you're signed in. No password.

Mechanically:

  1. The firm invites a client. The portal generates a random token (typically 32 bytes of secure randomness, encoded so it fits in a URL) and stores only a SHA-256 hash of it in the database.
  2. The raw token goes into a URL like https://example.com/portal/AbC123..., which is emailed to the client.
  3. The client opens the link. A well-built portal first shows a short confirmation page with a single button. This matters because many company mail systems open links automatically to scan them; if the token were used on that first visit, the scanner would use it up before the client ever saw it.
  4. The client presses the button. The server hashes the token, finds the matching hash, checks it hasn't expired or been used, and creates a signed session cookie.
  5. The token is marked as used. Opening the same link again shows a "this link has already been used" page with a way to ask for a new one.

The session cookie is HttpOnly, Secure, SameSite=Lax and signed with a server-side secret. Session lifetimes are typically 7-30 days, after which the client asks for a fresh link by email. No password to remember, lose or have phished.

Why it's a sensible default for client portals

Password sign-in is built for people who use a system several times a week: banking, email, work tools. The effort of remembering a password is spread across thousands of logins.

Client-portal use doesn't look like that. An accounting client might open their portal a handful of times a year: to upload documents, to review the draft return, to look at the invoice. A legal client might open theirs ten times across a six-month matter. An agency client a couple of times in a project.

For that pattern, a password costs a lot per use. Opening an email and clicking is close to what the client already does.

There are five concrete advantages:

1. No password-reset requests. Password resets are one of the most common support requests for any login. Magic links remove that category.

2. A stronger secret. People reuse short, guessable passwords. A 32-byte random token has 256 bits of entropy, far beyond anything a person would choose.

3. No credential stuffing. When the next big password breach happens, your clients' passwords aren't in it, because they don't have one with you.

4. Fewer abandoned invitations. Every step between the email and the portal is a place where a client can give up. Removing the account-creation step removes one of the biggest.

5. Easier for less technical clients. "Click the link in your email" is understood by almost everyone. "Create a strong password" is not.

Objections people raise

"What if someone gets access to the client's email inbox?"

If an attacker has access to the client's email, they also have access to every other system that allows password reset by email, which is nearly every system. Magic-link sign-in isn't worse than passwords in this scenario; it's the same.

The defences are one-time tokens, a limited link lifetime and sessions that end. Some products expire invite links within a day; others allow a couple of weeks so a client who is travelling can still get in. One-time use matters more than the exact lifetime.

"What if the email is forwarded?"

If the email is forwarded after the client has used the link, the link is dead. If the forwarded copy is used first, the client sees "this link has already been used" and can tell you, which is your cue to act (the same risk exists with password-reset emails).

For matters that need strict identity confirmation, such as accepting an engagement letter, add a step outside the portal: confirm with the client by phone before you rely on their decision.

"What about clients who lose access to their email?"

Links are reissued on demand. If the client lost access to their email AND can't be reached by phone, you have a bigger problem than the sign-in method.

"Doesn't this train clients to click links in emails?"

This is a real concern. Mitigations:

  • Send invitations with a consistent sender name that includes your firm's name
  • In your own messages, tell clients to expect the invitation and who it comes from
  • Mention the work it relates to and the person who's expecting the client
  • Give clients a page they can visit themselves to request a fresh link, so they never need to rely on an unexpected email

Where magic-link auth is NOT appropriate

Magic links don't fit every context. Cases where you need something else:

1. High-frequency users. Your firm's own staff are in the system several times a day. They need proper accounts with passwords. Magic links are for the client side.

2. Compliance regimes requiring "something you know" plus "something you have." Some regulated workflows (medical records, banking, some government services) require multi-factor sign-in with a password component. Email access counts as "something you have," not "something you know."

3. Several people sharing one client mailbox. If five people at the client trade off on a shared address, sessions and decisions can't be tied to one person. Ask for named addresses or use a tool built for shared access.

4. Clients whose organisation blocks outside email. If the link never arrives, you need another way in, agreed with the client's IT team.

For most small-firm client portals, none of these apply.

What a good implementation looks like

A defensible magic-link implementation has these properties:

  • Tokens are cryptographically random (from a secure random number generator, not Math.random())
  • Only a SHA-256 hash of each token is stored
  • Tokens have a limited lifetime
  • Tokens are one-time use, with a clear "already used" page and a way to ask for a new link
  • A confirmation step before the token is used, so link scanners don't consume it
  • Rate limiting on the endpoints that send links
  • HTTPS-only, HttpOnly, Secure, SameSite=Lax cookies for the resulting session
  • Signed session cookies with a server-side secret
  • A record of when each link was issued and used

If a portal vendor can't describe their implementation in these terms, ask harder questions before buying.

What this looks like in ClientNest365

ClientNest365 uses magic links for client access. Tokens are 32 bytes of randomness; the database stores SHA-256 hashes only. An invite link lasts 14 days and works once: it opens a confirmation page, and the link is used when the client presses Open your portal. The session cookie is signed with a server-side secret and lasts 30 days in that browser. A client whose session has ended, or whose link was already used, can request a fresh link at clientnest365.com/portal-resume by entering the email you have on file.

The firm side signs in with email and password. Magic links are not used for the firm side.

To see what a client lands in after following an invite, open the public demo; it opens a sample client portal without an email. The agency walkthrough, accounting walkthrough, and law-firm walkthrough describe illustrative engagements around it.

The summary: passwords are for software people open every day. Magic links are for software people open a few times a year. Pick the sign-in method that matches the actual use.

Related