Hi , I am using '/libs/granite/security/currentuser.json' to fetch current user in js. I see it is returning user as expected in Author instance where as In Publish it always returns 'anonymous'.
I tried logging into Publish AEM but still the user state is not persisting. Is there a way we can achieve this ?
Version of AEM : 6.5
ServicePack : AEM 6.5 Service Pack 9 (6.5.9.0)
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
You can hit the login end-point - /libs/granite/core/content/login.html directly, which will give you the login screen and you should be able to login to Publish instance.
http://localhost:4503/libs/granite/core/content/login.html
Hi @MadhuriMaddala26 , is it working when you hit the path - http://localhost:4503/libs/granite/security/currentuser.json directly in a browser window instead after logging in?
Hi ,Thanks for replying.
The issue I see is Publish instance is not allowing us to login I tried with Weretail and I can see the issue there as well.
http://localhost:4503/libs/granite/security/currentuser.json is always returning anonymous ID. The loggedin state of user is not persisting.
{"type":"user","authorizableId_xss":"anonymous","authorizableId":"anonymous","name_xss":"anonymous","name":"anonymous","home":"/home/users/8/8QmmwYU5F6MOHNiF0XEI","isImpersonated":false}
Is there any other way we can get user name on pageload ?
You can hit the login end-point - /libs/granite/core/content/login.html directly, which will give you the login screen and you should be able to login to Publish instance.
http://localhost:4503/libs/granite/core/content/login.html
@kautuk_sahni Need your inputs here please. Thanks
if you are not logged in AEM then you will not get user details.
The default or anonymous user is 'anonymous'
Views
Likes
Replies