hurt-tomatoH
Refine3y ago
7 replies
hurt-tomato

custom messsage on event notification

Hi everyone, i am currently working on permission on my refine app. I allow only admin user to login to the app. To do that, i write this code in the login method in the authProvider which work fine.
return authProvider.getPermissions().then((res) => res.includes("ROLE_ADMIN") ? Promise.resolve() : Promise.reject());

That i would like to know is how can i customize the nottification message which appear when a non admin account try to log in the app because currently i have a message which tel : "invalid credential" like on the picture and would to write something else in the notification.
Capture_decran_du_2023-03-07_14-06-54.png
Was this page helpful?