Skip to main content
Urbicon UI
source

SessionManagerbeta

Lists the user's active sessions (refresh-token families) with a device label, last-active time and a 'this device' badge, and lets them sign out one session or all other devices. Requires refresh-token rotation on the server.

01 Usage

Basic

The live preview runs against a mocked demo API (injected via the fetcher prop) — signing a session out updates the list. The snippet shows the production setup. Needs config.refreshToken rotation on the server; without it the component reports itself unavailable.

Active sessions

Loading...
<script lang="ts">
  import { SessionManager } from '@urbicon-ui/auth';
</script>

<SessionManager apiPath="/api/auth/sessions" />

02 Accessibility

Sessions are a list

The devices render as a <ul> of <li>, so a screen reader announces how many sessions exist before reading them and the user can jump between them with list navigation.

The current device is marked with a word, not a colour

The current session is marked with a Badge containing localized text. Nothing on this page relies on colour alone to distinguish the session you are sitting at from the ones you are about to revoke — which matters because that distinction is the difference between signing out a stranger and signing out yourself.

Only the row you acted on goes busy

Revoking one session sets loading and disabled on that row's button alone, so the rest of the list stays operable and blocks' Button reports aria-busy only where something is actually happening.

The per-row buttons share one accessible name

Each row's sign-out button has no aria-label, so its accessible name is just the localized "Sign out" — five sessions produce five identically named buttons, and context has to come from list navigation. PasskeyManager and InvitationManager solve the same problem by appending the row's subject to the label; this list does not yet.

03 API Reference

7 props
Prop
Type
Default
Description

04 Types

Local type definitions used by this component.

5 types
Name
Kind
Category
Used by
Description

05 Installation

Import

import { SessionManager } from '@urbicon-ui/auth';