Logout if access deny

exports.onExecutePostLogin = async (event, api) => {
  if (!event.user.email.endsWith("@mycomp.com")) {
    api.access.deny(`Access to ${event.client.name} is not allowed.`);
  }
};

how can i logout user if access deny ?

Hey there @toshuk.kr !

The action shared should result in a failed login - Can you elaborate on what you are looking to achieve here if the user isn’t able to login to begin with?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.