Track devices like you track your Strava segments – with precision, purpose, and zero frustration
Real Slack message from FrontRangeHealthcare: "Our doctors using iPads during 8-hour shifts keep getting logged out. They're losing patient data mid-procedure. We need sessions that actually last!"
That's what happens when session management is an afterthought. Users get frustrated, productivity drops, and your support team starts eyeing career changes.
David from MountainMedical solved this:
"Our doctors use iPads during 8-hour shifts. Before 23blocks, they'd get logged out mid-procedure. Now? Zero interruptions. Just saved surgery time and probably a few lawsuits."
Track iPhone, laptop, tablet separately. Each device gets its own session with intelligent management.
Configurable session lifetimes with automatic extension. Long-lived sessions without security risks.
Track session activity, detect suspicious patterns, and manage concurrent sessions in real-time.
// Initialize session with device context
const session = await auth.createSession({
userId: user.id,
deviceId: getDeviceFingerprint(),
deviceType: "iPhone_13_Pro",
deviceName: "Sarah's iPhone",
expiresIn: "24h",
extendOnActivity: true
});
// {
// sessionId: "sess_abc123",
// token: "eyJ...",
// expiresAt: "2024-02-15T14:30:00Z",
// deviceInfo: { ... }
// }// SDK handles session extension automatically
import { SessionManager } from '@23blocks/auth-sdk';
const sessionManager = new SessionManager({
autoExtend: true,
extendThreshold: 300, // Extend when 5 min left
onSessionExtended: (newExpiry) => {
console.log('Session extended until:', newExpiry);
},
onSessionExpired: () => {
// Redirect to login
window.location.href = '/login';
}
});
// Sessions extend automatically on user activity// Get user's active sessions
const sessions = await auth.getUserSessions(userId);
// [
// { id: "sess_1", device: "iPhone", lastActive: "2024-02-15T10:30:00Z" },
// { id: "sess_2", device: "MacBook", lastActive: "2024-02-15T09:15:00Z" }
// ]
// Revoke specific session
await auth.revokeSession("sess_1");
// Revoke all sessions except current
await auth.revokeAllOtherSessions();
// Check session status
const status = await auth.getSessionStatus();
// { valid: true, expiresIn: 3600, deviceCount: 2 }Carlos Mendez, Principal Engineer:
"Device management let us implement 'trusted device' features that our users love. They can seamlessly switch between phone, tablet, and in-car systems without constantly re-authenticating."
From 5 minutes (paranoid mode) to 30 days (trusted devices)
Automatic session extension based on user activity patterns
Configurable concurrent session limits per user
Stop apologizing for random logouts. Start delivering sessions that just work, everywhere, every time.
P.S. Our session management is like a perfectly tuned mountain bike – handles rough terrain without breaking a sweat and always gets you where you need to go.
P.P.S. We've managed more sessions than there are trails in Boulder County. That's over 100 million concurrent sessions handled with zero downtime.
Get product updates, engineering posts, and new block announcements delivered to your inbox.