BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/better-auth-ui/active-sessions

Active Sessions

better-auth-ui/active-sessions
FreeComponent

Display and manage all active sessions for the current user with revoke controls. Shows each session's browser, OS, and creation time.

Live preview

live · rendered by the registry
Rendered by better-auth-ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://better-auth-ui.com/r/active-sessions.json

Source

src/components/auth/settings/security/active-sessions.tsxbetter-auth-ui.com/r/active-sessions.json
1"use client"
2
3import { useAuth, useListSessions, useSession } from "@better-auth-ui/react"
4import { Fragment } from "react"
5import { Card, CardContent } from "@/components/ui/card"
6import {
7 Item,
8 ItemContent,
9 ItemGroup,
10 ItemMedia,
11 ItemSeparator
12} from "@/components/ui/item"
13import { Skeleton } from "@/components/ui/skeleton"
14import { cn } from "@/lib/utils"
15import { ActiveSession } from "./active-session"
16
17export type ActiveSessionsProps = {
18 className?: string
19}
20
21/**
22 * Render a card listing all active sessions for the current user with revoke controls.
23 *
24 * Shows each session's browser, OS, IP address, and creation time. The current session is marked
25 * and navigates to sign-out on click, while other sessions can be revoked individually.
26 *
27 * @returns A JSX element containing the sessions card
28 */
29export function ActiveSessions({ className }: ActiveSessionsProps) {
30 const { authClient, localization } = useAuth()
31 const { data: session } = useSession(authClient)
32
33 const { data: sessions, isPending } = useListSessions(authClient)
34
35 const activeSessions = [...(sessions ?? [])].sort((activeSession) =>
36 activeSession.id === session?.session.id ? -1 : 1
37 )
38
39 return (
40 <div>
41 <h2 className="text-sm font-semibold mb-3">
42 {localization.settings.activeSessions}
43 </h2>
44
45 <Card className={cn("p-0", className)}>
46 <CardContent className="p-0">
47 {isPending ? (
48 <SessionRowSkeleton />
49 ) : (
50 <ItemGroup className="gap-0">
51 {activeSessions?.map((activeSession, index) => (
52 <Fragment key={activeSession.id}>
53 {index > 0 && <ItemSeparator />}
54 <ActiveSession activeSession={activeSession} />
55 </Fragment>
56 ))}
57 </ItemGroup>
58 )}
59 </CardContent>
60 </Card>
61 </div>
62 )
63}
64
65function SessionRowSkeleton() {
66 return (
67 <Item>
68 <ItemMedia>
69 <Skeleton className="size-10 rounded-md" />
70 </ItemMedia>
71 <ItemContent>
72 <Skeleton className="h-4 w-20" />
73 <Skeleton className="h-3 w-32" />
74 </ItemContent>
75 </Item>
76 )
77}

What it pulls in

npm packages

  • @better-auth-ui/react@latest
  • @better-auth-ui/core@latest
  • better-auth
  • bowser
  • lucide-react

Other registry items

  • badge
  • button
  • card
  • item
  • skeleton
  • sonner
  • spinner

Files it writes

  • src/components/auth/settings/security/active-sessions.tsx
  • src/components/auth/settings/security/active-session.tsx

Facts

Registry
better-auth-ui
Type
registry:component
Access
Free
Files written
2
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
yesterday

Go to the source

Docs on better-auth-ui better-auth-ui.com better-auth-ui/better-auth-ui on GitHub Raw registry item This item as JSON

More from better-auth-ui

All 49 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Account Settingsaccount-settingsbetter-auth-uiComponentsFree2 deps
Additional Fieldadditional-fieldbetter-auth-uiComponentsFree5 deps
Adminadminbetter-auth-uiComponentsFree4 deps · 3 files
Anonymousanonymousbetter-auth-uiComponentsFree4 deps · 3 files
API Keyapi-keybetter-auth-uiComponentsFree4 deps · 10 files
Authauthbetter-auth-uiComponentsFree2 deps
Auth Providerauth-providerbetter-auth-uiComponentsFree4 deps · 2 files
Auth Redirectauth-redirectbetter-auth-uiComponentsFree3 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex