• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1316
  • Last Modified:

How do I script signout process for SharePoint 2013 in JavaScript?

I am looking to set up a custom signout button within SharePoint 2013.  I would like to clear the fedauth cookie as a part of the process.  Has anyone written a javascript to accomplish this?
0
CKH00629
Asked:
CKH00629
1 Solution
 
Jayaraja JayaramanSharepoint Architect ConsultantCommented:
This si for adding sign in as different user
javascript:void(window.location.href='/_layouts/closeConnection.aspx?loginasanotheruser=true&Source=' + encodeURIComponent(window.location.href));

OR

<script type="text/javascript">
    function Timeout(){
        var t = setTimeout("RedirectToLogout()", 20*60000);
    }
    function RedirectToLogout(){
       var path = SP.Utilities.Utility.getLayoutsPageUrl("SignOut.aspx");
       window.navigate(path);
    }
    </script>
i have added this script in body section

<script>
    window.onload=Timeout;
</script>

Or in more easy
<a href="_layouts/signout.aspx">log out</a>
0
 
GaryCommented:
I've requested that this question be deleted for the following reason:

The question has either no comments or not enough useful information to be called an "answer".
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now