Skip to content

feat: update session cookie management and JWT expiration#996

Merged
iziang merged 1 commit into
mainfrom
support/cookie
Jun 26, 2025
Merged

feat: update session cookie management and JWT expiration#996
iziang merged 1 commit into
mainfrom
support/cookie

Conversation

@iziang
Copy link
Copy Markdown
Contributor

@iziang iziang commented Jun 26, 2025

  • Increased session cookie max age to 86400 seconds (1 day).
  • Updated JWT token lifetime to match the new session duration.

- Increased session cookie max age to 86400 seconds (1 day).
- Updated JWT token lifetime to match the new session duration.
@apecloud-bot apecloud-bot added the size/XS Denotes a PR that changes 0-9 lines. label Jun 26, 2025
@iziang iziang merged commit ae1efb6 into main Jun 26, 2025
7 of 9 checks passed
@iziang iziang deleted the support/cookie branch June 26, 2025 03:36
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: JWT Lifetime Mismatch Causes Authentication Issues

The JWT strategy's lifetime is hardcoded to 86400 seconds, creating an inconsistency with cookie expiration which uses the COOKIE_MAX_AGE constant. This can lead to authentication issues if COOKIE_MAX_AGE is updated, as JWT token and cookie expiration times may become misaligned.

aperag/views/auth.py#L57-L58

def get_jwt_strategy() -> JWTStrategy:
return JWTStrategy(secret=SECRET, lifetime_seconds=86400)

Fix in Cursor


BugBot free trial expires on July 22, 2025
You have used $0.00 of your $1.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants