Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add single session per user with tags support #1297

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

hf
Copy link
Contributor

@hf hf commented Nov 4, 2023

Enforces a single session per user with optional tags. If a session has a tag, only the most recently refreshed session with the same tag can be refreshed. If no tags are configured, then only the most recently refreshed session of all of the user's sessions will be refreshed.

Sessions that are invalid due to inactivity or timeboxing won't be considered.

internal/api/token_refresh.go Outdated Show resolved Hide resolved
@hf hf force-pushed the hf/single-session-per-user-tags branch 4 times, most recently from e4c367e to 54b73e2 Compare November 7, 2023 12:34
@hf hf force-pushed the hf/single-session-per-user-tags branch 2 times, most recently from a178b7d to 89e77d6 Compare November 13, 2023 14:50
@hf hf marked this pull request as ready for review November 13, 2023 15:05
@hf hf requested a review from a team as a code owner November 13, 2023 15:05
internal/models/sessions.go Outdated Show resolved Hide resolved
Copy link
Contributor

@J0 J0 left a comment

Choose a reason for hiding this comment

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

LGTM

migrations/20231102155822_add_sessions_tag.up.sql Outdated Show resolved Hide resolved
internal/conf/configuration.go Show resolved Hide resolved
internal/models/refresh_token.go Show resolved Hide resolved
internal/models/sessions.go Show resolved Hide resolved
internal/models/sessions.go Show resolved Hide resolved
internal/models/sessions.go Show resolved Hide resolved
@hf hf force-pushed the hf/single-session-per-user-tags branch from 89e77d6 to fcd541f Compare November 14, 2023 16:22
@hf hf force-pushed the hf/single-session-per-user-tags branch from fcd541f to 4dfe81f Compare November 15, 2023 18:22
@hf hf merged commit 69feebc into master Nov 15, 2023
1 check passed
@hf hf deleted the hf/single-session-per-user-tags branch November 15, 2023 18:35
Copy link
Contributor

🎉 This PR is included in version 2.113.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
Enforces a single session per user with optional tags. If a session has
a tag, only the most recently refreshed session with the same tag can be
refreshed. If no tags are configured, then only the most recently
refreshed session of all of the user's sessions will be refreshed.

Sessions that are invalid due to inactivity or timeboxing won't be
considered.
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
Enforces a single session per user with optional tags. If a session has
a tag, only the most recently refreshed session with the same tag can be
refreshed. If no tags are configured, then only the most recently
refreshed session of all of the user's sessions will be refreshed.

Sessions that are invalid due to inactivity or timeboxing won't be
considered.
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
Enforces a single session per user with optional tags. If a session has
a tag, only the most recently refreshed session with the same tag can be
refreshed. If no tags are configured, then only the most recently
refreshed session of all of the user's sessions will be refreshed.

Sessions that are invalid due to inactivity or timeboxing won't be
considered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants