Skip to content

Add configuration for session token properties (lifetime, expiration, etc.) in AuthConfig #4128

Closed

Description

@coderabbitai

Summary

The server-side session token manager implemented in PR #4127 currently does not expose configuration options for controlling session properties such as session lifetime, expiration policies, and other token-related settings.

Parent Issue

This is a sub-issue of #3856 - Add shared configuration interface for authentication providers with generalized configuration list.

Current State

PR #4127 introduces AuthSessionsTokenManager which manages server-side session tokens, but session configuration properties are not currently exposed through the AuthConfig interface.

Requirements

Add configuration options to control session token properties, including:

  • Session lifetime/duration (time until expiration)
  • Session expiration policies (absolute vs. sliding expiration)
  • Session refresh policies
  • Maximum concurrent sessions per user
  • Session timeout settings
  • Other relevant token/session properties

Proposed Solution

Extend the AuthSessionConfig or create a new configuration class that can be passed to AuthSessionsTokenManager through the AuthConfig setup, allowing developers to customize session behavior based on their application requirements.

References

Acceptance Criteria

  • Define session configuration properties
  • Expose configuration through AuthConfig or related configuration classes
  • Update AuthSessionsTokenManager to respect configured session properties
  • Add validation for configuration values
  • Add documentation with examples
  • Add tests for various session configuration scenarios

Activity

  1. moved this from Inbox 📫 to Planned 🔭 in Serverpod Frameworkson Oct 30, 2025
  2. added
    area: authentication
    enhancement
    on Oct 30, 2025
  3. moved this from Planned 🔭 to Next Up 🎯 in Serverpod Frameworkson Oct 31, 2025
  4. moved this from Next Up 🎯 to In Progress 🔥 in Serverpod Frameworkson Nov 3, 2025
  5. moved this from In Progress 🔥 to Done 🚀 in Serverpod Frameworkson Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area: authenticationenhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions