-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
Impossible to set a Session Cookie for jwt_s #809
Comments
I think we need a new, dedicated option here. |
Hi, In the document there is no mention of a refresh cookie and the cookie lifetime is extended with every authenticated request:
Therefore I wrote a subscriber to do it:
So what is left are two things:
For the 2. part.... should I open a new issue for that? |
This was referenced Nov 21, 2021
Closed
Hi, I juste made a pull request for the session cookie problem here #958 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm trying to set the configuration in "lexik_jwt_authentication.yaml" to follow the guidelines of the article Getting Token Authentication Right in a Stateless Single Page Application (that is mentioned in the docs of this bundle) to automatically generating split cookies.
According the article, we need two cookies, one (named jwt_hp) for the header and payload parts of the JWT, with a defined lifetime of 30 minutes and a second (named jwt_s) for the signature part of the JWT, as a Session Cookie.
In order to create a Session Cookie, we need to set the lifetime to 0, but this is impossible, because the lifetime is defaulted to the token_ttl lifetime or, if token_ttl is set to 0, we get the error "The cookie expiration time must be provided, either pass it as 3rd argument of Lexik\Bundle\JWTAuthenticationBundle\Security\Http\Cookie\JWTCookieProvider::createCookie or set a default lifetime via the constructor."
How can we create the jwt_s cookie as a Session Cookie?
The text was updated successfully, but these errors were encountered: