Skip to content
Deva Kumar edited this page May 24, 2020 · 4 revisions

Logout

This feature allows Viya applications to support logout option. On logout the user is given the option to log back on - just as any SAS Viya session allows the user to do.

SAS Logon Manager has an allowed URIs configuration. This a comma-delimited list of URIs that users can be redirected to after signing in following a time-out or logoff. SAS application URIs and registered client redirect URIs are automatically included in the list.

Use SAS Environment Manager to set this in SAS Logon Manager configuration. An example is

http://localhost:8080/viyaapp

The application's Logout code should like as shown below.

  function logout() {
           let url = `${window.location.protocol}//${window.location.host}/${LOGONPAYLOAD.appName}/logout`;
           window.location.replace(url);
       }

This will invoke the logout route in restaf-server. At the end of the processing the user will be given an option to re logon on or exit.

Clone this wiki locally