Persisting User Login/Session | Community
Skip to main content
Level 8
Mar 10, 2016 11:46 PM UTC

Persisting User Login/Session

I have a site where a user logs in and the request object is authenticated, i can also see that the user is authenticated by checking the CQ_Analytics object and checking the user profile data to see that isLoggedIn is true.

If the user closes their browser and navigates back to the site, the request is now unauthenticated, but, the CQ_Analytics object still recognizes the user as logged in.

How can i persist the login on the request so that the user stays logged in until they logout, or clear their cookies?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

8 replies

leeaslingAuthor
Level 8
Apr 21, 2016 7:23 PM UTC

This is still an issue and DayCare thus far have been unable to assist.

One thing I noticed is that the login-token cookie generated by AEM is for session only.  I looked through the OSGI configuration console for things like "token", "login" and "authentication" to try to find a configuration where i could change this but was not successful.  Is there such a thing?

Translate
Tuhin_Ghosh
Level 8
Jul 4, 2016 5:27 AM UTC

If you have already lodged a day care ticket please post the solution here and close this ticket.

 

Thanks

Tuhin

Translate
Tuhin_Ghosh
Level 8
Mar 10, 2016 11:56 PM UTC

Please check how the cookie is handled in your application. Its seems that on browser close the cookie getting invalidated somehow and thus this problem

Translate
leeaslingAuthor
Level 8
Mar 11, 2016 12:05 AM UTC

It's just using the standard AEM login by posting to j_security_check.  We don't have anything custom in the login what so ever.

Translate
Tuhin_Ghosh
Level 8
Mar 11, 2016 12:13 AM UTC

Understood, what I know of j_security_check is that it should be doing session management with cookie by default. Could you please look when your user is logging in is some cookie is created and stored and if yes then, after restarting the browser if the cookie is still present or not?

Translate