I am currently using session to manage user login.
I set a maxAge on the session so it stays even after user closes their browser window.
However, I would like to add an option for user to choose to forget their login once they close the browser window (think “remember me” unchecked).
I understand that we can configure session in application.conf as explained here, and I use this method to set maxAge on the session.
But how do I have two different configurations so that the maxAge config can be switched on and off?
I was hoping that I can programmatically configure the session but found no way to do it in the .withSession() call.
Btw, I am using Play Framework 2.8.8 with Scala 2.13.8.