I am checking user-approved status like this,
if (user.app_metadata && user.app_metadata.approved) {
return callback(new UnauthorizedError('Your registration must be approved by an administrator.'));
}
callback(null, user, context);
Issues 1: Upon login using Unapproved user credentials, I got an unauthorized error in the browser URL.
Issues 2: After this, error app reloads again and again and store cookies. After some attempts page, a blank page is shown and everything stop, not even loading app until i delete cookies.
I want to know
1: how to handle above thrown error on SPA
2: how to get rid of this reloading the app in the loop and deleting the cookies
Thanks Community.