Skip to main content

Session

The session refreshes itself before it expires. useUser() returns the same profile with fullName, initials and update().
<Authenticated> shows its fallback while the session is loading too. Check isLoading yourself if that flash matters.

Log in and register

Read the profile from useAuth().user, which loads right after. On an invite-only project, pass invitationToken or invitationCode to register(), once you’ve validated it.
On an invite-only project, pass { invitationToken } or { invitationCode } as the second argument of startPasswordless().

Email verification

sendVerificationEmail() throws if called again within 60 seconds: disable the button while it’s pending.

Passwords

Account activation

completeActivation() signs the user in.

Auth config

Your project’s sign-in settings: which methods are on, the registration mode, the password policy, branding. Build a custom sign-in screen from it. Fields: Auth config.

Session handoff

Users who sign in on your hosted portal come back to your app with a one-time code in the URL. KerneProvider exchanges it for a session on load and removes it from the URL. There’s nothing to wire, but handle a failure, or the user arrives signed out with no explanation:
The exchange fails when the code was already used or is older than 60 seconds, or when Settings → API keys → Allowed domains lists domains and yours isn’t one of them. To send a session from a sign-in page on another domain of yours, use redirectWithSession(). It adds the code to the URL, never the token: