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

fix: set x-domain cookie lifetime to configured session lifetime #1049

Merged
merged 5 commits into from
Oct 9, 2023

Conversation

lfleischmann
Copy link
Member

@lfleischmann lfleischmann commented Sep 29, 2023

Description

Cross-domain cookies set via frontend-sdk have a Session max-age/expiry instead of a lifetime according to the set session lifetime configured via Hanko Cloud Console/self-hosted config.

Closes #1007

Implementation

Cookie max-age/expiry is calculated based of the X-Session-Lifetime header.

Tests

Because the frontend-sdk sets cookies only in a cross-domain scenario, you probably need a cross-domain setup of the applications.

@lfleischmann lfleischmann reopened this Sep 29, 2023
@lfleischmann lfleischmann marked this pull request as ready for review October 4, 2023 12:00
@lfleischmann lfleischmann merged commit 7069362 into main Oct 9, 2023
12 checks passed
@lfleischmann lfleischmann deleted the fix-x-domain-cookie-lifetime branch October 9, 2023 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

FrontEnd SDK: On create/signin, returned jwt cookie only valid for session - ignores jwt expiry
2 participants