Skip to content

[BUG]: Session cache TTL ignores runtime configuration #88

@Gautam25Raj

Description

@Gautam25Raj

Affected Apps / Packages

Server (apps/server)

Description

The backend audit found authenticated user identity cache TTL is hardcoded around 900 seconds instead of using AUTH_SESSION_CACHE_MAX_AGE_SECONDS. Session revocation latency can exceed expected runtime configuration.

Steps to Reproduce

  1. Configure AUTH_SESSION_CACHE_MAX_AGE_SECONDS.
  2. Authenticate a user.
  3. Revoke/mutate session.
  4. Observe cache behavior can continue using hardcoded TTL.

Expected Behavior

Auth cache TTL should respect runtime config and be invalidated on relevant auth/session changes.

Environment Information

  • App: @veriworkly/server
  • Middleware: auth/session cache

Relevant Logs

No response

Proposed Fix / Suggestions

  • Use config value for Redis session cache TTL.
  • Invalidate cache on sign-out/account/session mutations.
  • Add tests for configured TTL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendserver-side logicbugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions