Revoke a portal passkey (for example, after a lost device)

When a worker loses a device, an admin blocks the worker's portal sign-in, revokes the worker's passkeys, then lets the worker back in to register a passkey on the new device.

Where passkeys live

Each passkey is one Portal Passkey record (b3p__Portal_Passkey__c) linked to the worker's Contact (b3p__Contact__c). The record has a Revoked checkbox (b3p__Revoked__c). A revoked passkey cannot be used to sign in.

Workers can also revoke their own passkeys. Add a Manage passkeys link with destination @passkeys to the portal. The page lists the worker's active passkeys for the current portal origin, and Remove marks the selected one as revoked and records a Web Event of type Passkey Revoked (b3p__Web_Event__c).

Revoke passkeys for a lost device

  1. On the worker's Contact, check Disabled Portal User (b3p__Disabled_Portal_User__c). This blocks every portal sign-in for that Contact.

  2. Find the worker's passkeys:

    SELECT Id, Name, b3p__Origin__c, CreatedDate, b3p__Last_Used__c, b3p__Revoked__c
    FROM b3p__Portal_Passkey__c
    WHERE b3p__Contact__c = '<contactId>'
    ORDER BY b3p__Last_Used__c DESC NULLS LAST
  3. Revoke them. Setting Revoked keeps the audit trail:

    update new b3p__Portal_Passkey__c(Id = '<passkeyId>', b3p__Revoked__c = true);

    Or delete them if you do not need the history:

    delete [SELECT Id FROM b3p__Portal_Passkey__c WHERE b3p__Contact__c = :contactId];

    Data Loader, Workbench or Developer Console all work for this.

  4. Uncheck Disabled Portal User on the Contact.

  5. The worker signs in on the new device with an email code and chooses Add a passkey.

Let support staff do this from the UI

Create a permission set that grants Read and Edit (and Delete, if you want hard deletes) on b3p__Portal_Passkey__c and edit access to b3p__Revoked__c. Add a list view or a related list on Contact so support staff can find a worker's passkeys. Passkey activity is recorded on b3p__Web_Event__c.

Portal settings

Good to know