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. No special permissions are required to use this widget.
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> ); }