Identify your signed-in users
Tell the widget who is signed in to your product, so their conversations follow them and your team sees who they are.
Last updated Friday, November 27th, 2026
View as MarkdownOn this page
Without this, the widget knows a visitor by their browser: their conversations stay in that browser, and your team sees whatever name and email they type. Once your site identifies them, they're the same person on every device, and your team sees the name and email your product knows, verified.
Any script on a page can call the widget, so it believes only what your server signed. Your server signs a short token for each signed-in user with your workspace's identity secret, and your page hands that token to the widget.
How it fits together
- Your user signs in to your product, as they do today.
- Your server signs a token naming them, with the identity secret only it holds.
- Your page passes the token to
window.notert.identify. - Notert checks the signature against your secret, and the widget opens as that person: their conversations, their name, verified.
Nothing about the person travels unsigned, and the secret never reaches the browser.
Set it up
Working with an AI coding agent? On the install guide's Signed-in users tab, press Copy prompt and paste it into the agent: it carries the code below and tells the agent where each part goes. It names your identity secret only by its environment variable, NOTERT_IDENTITY_SECRET, so you still copy the secret and put it on your server yourself.
-
Copy your workspace's identity secret under Secrets on MCP & API, or in the install guide's Signed-in users tab, and keep it on your server. See your identity secret.
-
Choose what your site sends beside who the user is, on the same tab: their photo, their language, the companies they belong to, and up to 50 traits of your own, such as
planorseats. Ticked ones are kept and shown to your team; unticked ones aren't. Unticking the photo, the companies or a trait deletes what was kept for it, for everyone, so the guide asks before it does; ticked again, it fills in as each person next uses the widget. Keys your site sends that you haven't ticked appear in the list, unticked, so you can tick them. -
On your server, sign a token for the signed-in user. See sign a token on your server.
-
On your page, pass the token to the widget:
window.notert.identify(token); -
When they sign out, tell the widget:
window.notert.identify(null); -
Sign in to your site and open a page with the widget. On the Signed-in users tab, Check it works says "Waiting for a signed-in visitor…" until the widget loads for someone your token names, then which website it last did on and when, and each step's number turns into a check.
The tab walks the same five steps: Copy your secret, Choose what you send, Sign a token on your server, Hand it to the widget, and Check it works, which says when the widget last loaded for a signed-in visitor.
To check a token before your site sends it, open Check a token in the same step, paste one your server signed and press Check: it says whom the widget would know it as and when it stops counting, or what's wrong with it, as the widget would refuse it. Below that, it lists each optional claim the token carries: the language, photo, traits and companies as Notert reads them, any it ignores and why, such as a photo on a private address, and any you've unticked in Choose what you send. An ignored claim never stops the token from working, so this is the one place that says so. Only someone who can edit the workspace sees it.
Check it works counts pages on your websites, not on localhost, and goes back to waiting when you revoke the secret, until your site signs with the new one.
The token stays in the page's memory only. Call identify on every page load while they're signed in, before or after init.
Keep the token fresh
A token lasts a day at most, and a page your users keep open longer, such as an app left in a tab overnight, would then lose them: the widget stops hearing your team's replies and can't send. Rather than a token, pass a function that asks your server for a new one:
window.notert.identify(async () => {
const response = await fetch("/api/notert-token");
const { token } = await response.json();
return token;
});The widget asks it at once, and waits a few seconds at most for its answer before it reads anything; again about 5 minutes before each token it returned expires; and once more if a call is refused for an expired token, as when a laptop wakes up the next morning, then sends that call again. Your endpoint signs a token for whoever is signed in, as your page would. If the function throws or returns no new token, the widget keeps the one it has and says so once in the browser's console. When they sign out, identify(null) stops it asking. See identify.
What the token says
The token is a JSON Web Token signed with HS256, holding:
sub(string, required): your own id for the user. Two tokens with the samesubare the same person, whatever device they're on.email(string, required): the address they signed in to your product with.email_verified(boolean, required):true, once your product has confirmed the address, such as by an emailed link. A token without it is refused, since your team sees the person as the owner of that address.name(string, optional): the name your team sees. Leave the claim out when you don't have one, rather than sendingnull.iat(number, required): when you signed the token, in seconds since 1970. A token without one is refused.exp(number, required): when the token stops working, in seconds since 1970, no more than a day afteriat. A token without one, or one that lasts longer, is refused.language,picture,companiesandtraits(optional): what else your team sees, each while it's ticked on the Signed-in users tab. See sign a token on your server.
What changes for your users
- Their conversations follow them. Signed in on their laptop or their phone, they find the same conversations.
- Your team sees who they are, with the name and email from your token, marked as verified, their photo, and the traits you send beside their conversations and on their page, with the companies they belong to on their page. Their photo is never shown on your public board.
- A new token for the same user changes nothing they see. The widget keeps its screen and drafts, and goes on with the new token. A token for someone else, or
identify(null), starts the widget over with nothing of the last user's. - What the browser held before stays with the browser. Conversations someone started in that browser before signing in aren't joined to their account, since anyone could have used the browser.
- A token that doesn't hold hides the widget for that user, and says why in the console, rather than treating them as someone else. See troubleshooting.
If it doesn't work
| What you see | Look at |
|---|---|
| The widget is hidden for signed-in users | The browser's console says why the token was refused. Paste the token into Check a token |
| Check it works keeps waiting | It counts pages on your websites, not localhost. Sign in on your live site and open a page |
| Users are signed out of the widget after a day | Pass a function to identify rather than a token, as keep the token fresh shows |
| Your team sees the name the visitor typed, not yours | identify isn't called on that page, or is called before your app knows who's signed in |
Every message the widget writes to the console, and what to do for each, is in troubleshooting.