Hello,
I’m trying to prevent some users to access a specific application.
I’ve created a group is_not_application_user and attached the users that should not be accessing the application.
I have added a custom action:
exports.onExecutePostLogin = async (event, api) => {
if ((event.client.name === "Application") && !userRoles.includes("is_not_application_user"))
api.access.deny(`Access to ${event.client.name} is not allowed.`);
};
This action is inserted in login flow after the legacy rules.
If I test this with the application, I can never connect ( ?sso_failed=1). I can connect to the other application.
It should be a very basic thing but I m not good enough in programming ![]()
Thank you in advance for your help.
JC