Logout

Once the user logs in using the Login script, this logout script can then be called so that the user is logged out.

const callLogoutBtn = () => {
    const csc = window._csc as any;
    csc('logout', {
      debug: true,
      clientId: clientId,
      wrappingElementId: 'embed',
      logoutCallback: async () => {
        console.log('logout');
      },
      unauthorizedCallback: () => {
        console.log('unauthorized callback called');
      },
    });
  };

Last updated