Giter VIP home page Giter VIP logo

Comments (7)

pauldijou avatar pauldijou commented on June 12, 2024

I think maxAge also accepts Duration syntax. But in case of a number, it converts it to seconds. I don't assume anything and I'm using getConfigMillis which will read a duration as milliseconds from the config file. Did the session expired way later than planned in your project?

from jwt-scala.

khanetor avatar khanetor commented on June 12, 2024

What happened for me was that I set the maxAge = 300, which is supposed to be 300 seconds, or 5 minutes. However, due to the _ / 1000 part, the MAX_AGE is zero from 300 / 1000. This makes the JWT expire instantly. I will try out the duration format later. 😄

from jwt-scala.

pauldijou avatar pauldijou commented on June 12, 2024

Please, take a look at https://www.playframework.com/documentation/2.5.x/Migration23#Session-timeouts

You should either use a duration or multiply by 1000. Are you still using Play 2.3 or lower?

from jwt-scala.

khanetor avatar khanetor commented on June 12, 2024

No, I am using Play 2.5.1

On Apr 15, 2016, at 10:23 PM, Paul Dijou [email protected] wrote:

Please, take a look at https://www.playframework.com/documentation/2.5.x/Migration23#Session-timeouts https://www.playframework.com/documentation/2.5.x/Migration23#Session-timeouts
You should either use a duration or multiply by 1000. If you are using Play 2.3 or lower, that's problematic. Are you still using Play 2.3 or lower?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #21 (comment)

from jwt-scala.

pauldijou avatar pauldijou commented on June 12, 2024

The comments might be legacy. You could test if the session cookie expiration is 300ms or 300s later. It should be 300ms, just like the JWT token. If that the case, are you okay with using the new syntax or a bigger number?

from jwt-scala.

khanetor avatar khanetor commented on June 12, 2024

I will. Once I do that, I will feedback on this thread :). I am being stuck with some other tasks at the moment. I appreciate your work here ;)

On Apr 16, 2016, at 4:05 PM, Paul Dijou [email protected] wrote:

The comments might be legacy. You could test if the cookie session expiration is 300ms or 300s later. It should be 300ms, just like the JWT token. If that the case, are you okay with using the news syntax or a bigger number?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #21 (comment)

from jwt-scala.

pauldijou avatar pauldijou commented on June 12, 2024

Ok, closing for now but feel free to update.

from jwt-scala.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.