bknd-session-handling

Manage Bknd user sessions with JWT-based lifecycles and auto-renewal.

1|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/cameronapak/melos --skill bknd-session-handling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bknd-session-handling
Source: https://github.com/cameronapak/melos/tree/main/.agents/skills/bknd-session-handling
Command: npx skills add https://github.com/cameronapak/melos --skill bknd-session-handling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manage user sessions in Bknd apps with JWT-based lifecycles, covering token persistence, auto-renewal, authentication state checks, and safe expiration handling.

Core Features & Use Cases

  • JWT-based sessions: Create, persist, refresh, and invalidate user sessions across frontend and API routes.
  • Transport flexibility: Choose between httpOnly cookies for security or header-based tokens for manual control.
  • Server-side validation: Consistent authentication checks in API routes and server endpoints.
  • Use case example: A dashboard app that auto-renews user sessions on activity while protecting sensitive API endpoints.

Quick Start

Instantiate the BKND Api with a chosen storage (e.g., localStorage), log in to create a session, then call api.auth.me() to verify and refresh the session state.

Frequently Asked Questions about bknd-session-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage JWT sessions in a Bknd frontend application?

Manage JWT sessions in a Bknd frontend by instantiating the BKND API with a storage option like localStorage, logging in to create a session, and calling api.auth.me() to verify and automatically refresh the token state.

What is the best way to automatically renew authentication tokens in Bknd apps?

The best way to automatically renew authentication tokens in Bknd apps is using built-in JWT lifecycle management, which handles token persistence and auto-renews user sessions based on activity while protecting sensitive API endpoints.

Does Bknd session handling support httpOnly cookies for token storage?

Yes, Bknd session handling supports httpOnly cookies for secure token transport, alongside header-based tokens for manual control, providing flexibility for stateless JWTs across frontend and API routes.

How do I validate user authentication state on the server side with Bknd?

Validate user authentication state on the server side with Bknd by using integrated server-side session validation, which performs consistent authentication checks in API routes and server endpoints via bknd.auth APIs.

Can I use JWT-based session management for both frontend and API routes in Bknd?

Yes, you can use JWT-based session management for both frontend and API routes in Bknd, covering token persistence, auto-renewal, authentication state checks, and safe expiration handling across your application.

What are the limitations of using stateless JWTs for Bknd session management?

When using stateless JWTs for Bknd session management, you must implement safe expiration handling and choose appropriate transport methods like httpOnly cookies or headers to ensure secure token persistence and prevent unauthorized access.