-
Notifications
You must be signed in to change notification settings - Fork 898
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: remember me #1661
base: main
Are you sure you want to change the base?
feat: remember me #1661
Conversation
@Mujhtech what's the status on this? |
Hi @FlxMgdnz, I forgot to drop the comments here but can you check this comment? |
Hi @Mujhtech, regarding your first comment: yes, that would be a way to do it |
This commit adds the remember me functionality to the login element. It includes the following changes: - In the `config_default.go` file, the `Session` struct now has a new field `EnableRememberMe` set to `false`. - A new file `action_remember_me.go` is added to the `credential_usage` package, which implements the remember me action. - The `flows.go` file in the `flow` package now includes the `RememberMe` action in the `CredentialUsageSubFlow`. - Two new constants `ActionRememberMe` and `StashPathRememberMe` are added to the `const_action_names.go` and `const_stash_paths.go` files respectively. - The `LoginInitPage.tsx` and `LoginPasswordPage.tsx` files in the `pages` directory are modified to include a remember me checkbox.
If you check Cookie.ts file in frontend sdk, it use js-cookie to store the authentication token which I believe js-cookie makes use of session cookie, only hanko-session is stored in browser local storage
|
In the current implementation, the code that calls this method (HttpClient.processHeaders) also provides an expiry, so it is not a session cookie. Calling the method without an expiry (or max age) would make it a session cookie. Also btw.: Cookies can also be set in the backend if the relying party frontend/client runs on the same domain as the Hanko backend. So these would have to be adjusted, too. |
OK, I will update the the logic, as that's the only thing remaining |
@lfleischmann ready for review |
/award 750 Thanks @Mujhtech we'll take it from here |
Awarding Mujhtech: 750 points 🕹️ Well done! Check out your new contribution on oss.gg/Mujhtech |
Description
Fixes #1656
Implementation
Tests
Todos
Additional context