Hi!
I would like to know how to determine if the user is blocked on the post login action.
I want to implement the app that directs users to specific pages and displays an error message if they’re blocked.
Is there any event value maybe something like event.user.blocked?
If not, is there any other solution?
Thank you in advance!
exports.onExecutePostLogin = async (event, api) => {
if (event.user.blocked) {. // I would like to do something like this
api.redirect.sendUserTo("http://localhost:4300/home/?error=user_blocked");
}
};
There is not anything in particular related to a blocked user accessible in an Action - You could always add some sort of flag in metadata OR perhaps look into adding logic to catch the error in your application as described here: