Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Logout on asset-share not working for aem 6.5

Avatar

Level 8

Hi ,

I am able to login to asset share using the OOTB asset share functionality, but logout does not work

1>

the code used is 

<a class="cmp-user__action" href="#" data-asset-share-id="cmp-user-menu__logout-link">Log Out
</a> 

 

When we click on that it hits the code

// Events
$("body").on("click", ns.Elements.selector("cmp-user-menu__logout-link"), function() {
cart.clear();
});

 

But the issue it doesn't logout the user.

2>

I tried with adding 

<a class="cmp-user__action" href="/system/sling/logout.html" data-asset-share-id="cmp-user-menu__logout-link">Log Out</a> 

 

Here again it does not logout the user and shows up 404 error message

 

Not Found

The requested URL /system/sling/logout.html was not found on this server.

 

Could some one help me to resolve the issue

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @srinivas_chann1, I am not sure if you are accessing AEM directly or via Apache/dispatcher. If you are connected via Apache/Dispatcher please check if /system/sling/logout.html is not blocked there - you can also try to connect to your AEM instance directly and try use /system/sling/logout.html. Alternatively you can try to use /system/sling/logout so without html extension.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @srinivas_chann1, I am not sure if you are accessing AEM directly or via Apache/dispatcher. If you are connected via Apache/Dispatcher please check if /system/sling/logout.html is not blocked there - you can also try to connect to your AEM instance directly and try use /system/sling/logout.html. Alternatively you can try to use /system/sling/logout so without html extension.