A widget for displaying and managing user sessions in your application.

The <UserSessions /> widget provides users with visibility into their active sessions across different devices and browsers. Users can view session details and sign out of individual sessions as needed.
In order to use the User Sessions widget, a user must have a role that has the widgets:users-table:manage permission.
import { UserSessions, WorkOsWidgets } from '@workos-inc/widgets'; /** * @param {string} authToken - A widget token that was fetched in your backend. See the * "Tokens" section of this guide for details on how to generate the token * @param {string} currentSessionId - The ID of the current session */ export function SessionsPage({ authToken, currentSessionId }) { return ( <WorkOsWidgets> <UserSessions authToken={authToken} currentSessionId={currentSessionId} /> </WorkOsWidgets> ); }