-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Clarity over TTL and Session Expiration #360
Comments
The We use these two TTL's to determine idle sessions. The session id becomes stale after 15 minutes, and the user has another 15 minutes to make another request before the session id gets deleted by the server. Thus detecting session activity only happens when To limit the session to 15 minutes maximum, you can decrease plug Pow.Plug.Session, otp_app: :my_app,
session_ttl_renewal: 0,
session_store: {Pow.Store.CredentialsCache, ttl: :timer.minutes(15)} plug Pow.Plug.Session, otp_app: :my_app,
session_ttl_renewal: :timer.minutes(1),
session_store: {Pow.Store.CredentialsCache, ttl: :timer.minutes(15)} Note that it isn't necessary to set the The way you set the values means that the session will always expire since it won't be able to roll the session id before the server expires it. I'll open a PR to explain the above automatic session expiration logic in the docs for Let me know if this makes it clear how automatic expiration works 😄 |
Updated docs in #367. I think I'll wait with absolute timeout implementation. |
Hi Dan,
I may have got my thoughts a little muddled on this but could you clarify:
plug Plug.Session
, but I thought I could set this in a POW config?I don't think I understand renewing a token, versus an actual login challenge being presented to the user. I was assuming that a
session_ttl_renewal: :timer.minutes(15)
meant the user would need to login again after 15 minutes of inactivity, but in my testing I haven't been able to get this behaviour.The text was updated successfully, but these errors were encountered: