Best Approach for "Remember Me" Functionality with Vaadin and EclipseStore

Hi everyone,

I’m working on a Vaadin project and am looking for guidance on how to implement a “remember me” feature that keeps users logged in for up to 6 months. Every time I restart my app or reopen a page after a few days, it forces a new login, which I’d like to avoid.

In the past, I’ve used Spring Session with Redis for session persistence, but this time I’m using EclipseStore and more importantly I’ve never done this with Vaadin. I’ve noticed that Vaadin is now encouraging the use of Control Center and sticky sessions. I’m a bit unsure of the terminology and what the best approach would be for this scenario. I’d like to avoid the added complexity of Control Center, but if it’s the recommended way to handle this, then I’ll do the work.

Could anyone advise on the recommended way to achieve this with Vaadin and EclipseStore? Should I be looking into sticky sessions with Control Center, or is there another solution I should consider?

Thanks in advance for your help!

I would suggest to take a look at JWT authentication with Vaadin Flow - for better developer and user experience | Vaadin as alternative.

1 Like

Wow, great article! Well, it seems like it’s a couple years old, but since you recommended it, I’m going to assume that this is still the recommended path. I’ll try it. Thanks!

It worked! :slight_smile:
It took me a bit. If anyone else is reading this in the future and having trouble, make sure you are handling the JWT in AuthenticatedUser in the same was the the github example.

1 Like

I would always recommend this approach over redis or other session storage because it makes your life unnecessary harder if your only requirement is “remember me” :slightly_smiling_face:

2 Likes