Git Product home page Git Product logo

Comments (5)

vpavic avatar vpavic commented on July 29, 2024 1

Your english is just fine @Jafee.

Spring Session backed remember me works just fine for me with this sample app. Note that SpringSessionRememberMeServices doesn't generate an additional cookie for remember me, but rather simply sets session's maxInactiveInterval to 30 days and sets appropriate flag to request so that the DefaultCookieSerializer can set extended max-age for the session cookie.

Here are the relevant parts of the code:

https://github.com/spring-projects/spring-session/blob/2e26c6e9d3e0ae2305c010bb5bcee7c6b9768768/spring-session-core/src/main/java/org/springframework/session/security/web/authentication/SpringSessionRememberMeServices.java#L83-L84

https://github.com/spring-projects/spring-session/blob/2e26c6e9d3e0ae2305c010bb5bcee7c6b9768768/spring-session-core/src/main/java/org/springframework/session/web/http/DefaultCookieSerializer.java#L117-L122

from demo.

vpavic avatar vpavic commented on July 29, 2024

Looking at your sample app, it appears to be working correctly for me. Can you clarify what exactly do you mean by:

It didn't work. If I remove the spring session module, remember me will work.

from demo.

Jafee avatar Jafee commented on July 29, 2024

Now this project(master branch), after logging in to the account, does not write a cookie for the browser. Turn off your browser and you will need to log in again.

If you remove the spring session module, the browser will write a cookie named remember-me after logging in, and the project after removing the spring session module is here.

My English is not very good, And thanks for your patience @vpavic .

from demo.

Jafee avatar Jafee commented on July 29, 2024

@vpavic Understand, thank you for your clear explanation, and I have benefited from your communication.

In addition, if SpringSessionRememberMeServices can complement the cookie read and write operations in loginSuccess, autoLogin and loginFail like PersistentTokenBasedRememberMeServices and TokenBasedRememberMeServices, it will be used more in line with our expectations.

from demo.

vpavic avatar vpavic commented on July 29, 2024

NP @Jafee, glad I could help - it's always easier to provide support if users put together a sample app so thank you for that.

If you have any problems or improvement suggestions for SpringSessionRememberMeServices please open a ticket on Spring Session issues.

from demo.

Related Issues (1)

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.