3B Portals uses a passwordless, token based login. A portal user is a Contact. There is no password. Users can sign in with a magic link (see Magic links and session keys), a one time email access code, or an optionally configured passkey. Each method results in a portal session key. In 12.5, enable Secure Session Keys after migrating dependent packages to use signed tokens that always expire and support server-side revocation. Legacy tokens remain in use while the setting is off.
b3p.Portal action sendAccessCode. The action generates a fresh 6 character code, stores it on the Contact Temporary_Password__c, logs an Access Code Request Web Event, and makes the code available to your configured email sender. Enable the packaged sender or retain your existing automation; see Verification emails and code lockout.validateAccessCode. On a match the action mints a session key, clears Temporary_Password__c (the code is single use), logs a Success Validating Access Code event, and returns the session key. On mismatch it increments the incorrect-attempt counter, logs Invalid Access Code Entered, and returns an error. The code remains unchanged until the lockout limit is reached. Successful verification resets the counter.Disabled users (Disabled_Portal_User__c) are blocked from portal access. From 12.0.0, repeated incorrect codes disable the Contact once the configured limit is reached, including when the code is used for passkey enrolment. Requesting another code does not reset the counter. See Verification emails and code lockout for the configurable limit, support fields and recovery steps.
From version 11.2.0, administrators can enable passkeys for an exact HTTPS portal origin. Supported browsers show Sign in with a passkey. Users select a saved account and complete their device verification without entering an email address. Email-code login remains available.
With passkeys enabled, successful email verification offers Add a passkey before entering the portal. Users can register one or select Continue without adding; cancelling enrolment preserves the verified email login. A magic link or an existing session cannot authorise enrolment. See Passkey login for setup, limits and recovery.
If registration is allowed, the user provides first name, last name, and email. The frontend calls registerUser. The action checks for an existing or disabled Contact, otherwise creates a Contact with a temporary access code and logs a Registration Web Event. The user then verifies the emailed code exactly like the login flow.
From 12.0.0, select Disable Self Registration (b3p__Disable_Self_Registration__c) on a Web Portal to allow only existing Contacts to sign in. The setting is off by default.
The login screen hides Not registered?, ignores ?frontDoor=register, and the server rejects registration for that portal with: "Self registration is not available on this portal. Please contact us for access."
Custom integrations calling registerUser should pass the current pageId alongside the user's name and email. The Page's Web Portal determines the setting. If the page ID is missing, invalid or has no Web Portal, registration is blocked when any Web Portal in the org disables self-registration.
The login UI is the x-login-component web component. It is not a draggable builder block. The runtime injects it programmatically when a page needs authentication.
actionType (login or register), loginStep (email or code), registerStep (details or code).@api label props (login label, username label, verify code label, first name label, success messages, and so on). The host Portal.page passes several from Salesforce custom labels so the UI can be localised.pc-field-text inputs with client side validation (checkValidity, reportValidity) that maps native validity state to the field error styling.themeType attribute (light or dark, default light).The login component and the portal shell communicate over the shared EventBus and DOM events:
sessionUpdate event and dispatches a bubbling DOM sessionupdate event with { sessionKey }.sessionUpdate, stores the key, clears the device cache, reloads the user, re-renders the page, and re-initialises push.requestLogin is fired by the router when a protected page is opened by an unauthenticated user, or by an @login action link. The shell creates an x-login-component, sets its labels, and appends it to the page.requestLogout is fired by an @logout action link. The shell calls b3p.Portal action requestLogout (which logs a Logout Web Event and records the Contact's session revocation time), waits for that request, clears the session key, and refreshes. With Secure Session Keys enabled, the Contact's signed sessions issued up to the revocation time stop working on every device.Inside page HTML you can trigger auth actions with special anchor hrefs handled by the runtime:
| href | Action |
|---|---|
@login |
Open the login component |
@logout |
Log the user out |
@passkeys |
Manage the signed-in Contact's active passkeys for this origin |
@setupPush |
Request push permission and register the device |
@testPush |
Send a local test notification |
Page navigation links use #PageName. See Web portals and pages.
sessionKey parameter on router calls. See Technical architecture and request flow.sessionKey URL parameter.