Skip to content

[G2M] auth - adds support for account expiry#88

Merged
amy83762100 merged 2 commits intomainfrom
access-expiry
Apr 28, 2025
Merged

[G2M] auth - adds support for account expiry#88
amy83762100 merged 2 commits intomainfrom
access-expiry

Conversation

@amy83762100
Copy link
Contributor

@amy83762100 amy83762100 commented Apr 25, 2025

Adds support for account expiration through a new access_expired_at field. If set, the system calculates the JWT token’s expiry based on this value. Once the expiration time has passed, the user is automatically deactivated and blocked.

Changes

  • Introduced access_expired_at column (TIMESTAMPTZ) in the user schema
  • Updated getUserInfo to deactivate user if access has expired
  • JWT TTL is now dynamically computed based on access_expired_at
  • If the access has expired, the user is deactivated and an AuthorizationError is thrown with a clear user-facing message.

@amy83762100 amy83762100 self-assigned this Apr 25, 2025
@amy83762100 amy83762100 changed the title [G2M] auth - adds support for account expiry [WIP] auth - adds support for account expiry Apr 25, 2025
@amy83762100 amy83762100 changed the title [WIP] auth - adds support for account expiry [G2M] auth - adds support for account expiry Apr 25, 2025
@amy83762100 amy83762100 requested a review from eq-ianecc April 25, 2025 21:41
@amy83762100 amy83762100 merged commit 7e2e719 into main Apr 28, 2025
4 checks passed
@amy83762100 amy83762100 deleted the access-expiry branch April 28, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants