Quick question,
I am creating customer logon with Reactive web. I know how to do it with Traditional but what would be the best approach for authentication. From what I see I cannot use the Check Role on the server side. Any thoughts?
Thanks
Otis Brown wrote:
Hi,
For reactive web app, it separates the client action and server action. And, the check role is server action, therefore, you need to do things like the images and implement the logic to return the check role result. Btw, you can use if in you client action and UI
Hope this help
Hi Otis,
Ceck this clientnsidenjavascript API, use $roles.NameOfTheRole instead of $roles.$parameters.RoleName
So if you have a role defined named Employee then use $roles.Employee
please be aware that client side UserRoles can easily be tampered with in browsers dev tools, so always validate server side to when you get or store data.
Regards,
Daniel
Daniël Kuhlmann wrote:
Just a small side-step from this discussion (since it is already answered by you for the client side part). Why on earth are these functions not available as Client Actions? Does anyone know the logic behind the choices on why a lot of client side functionality is not available in an OutSystems native manner?
there is some old post regarding same question
https://www.outsystems.com/forums/discussion/55602/how-to-check-role/
https://www.outsystems.com/forums/discussion/29777/cannot-use-check-roles-function/
Regards
Rahul