Home:ALL Converter>Angular routing authorization security

Angular routing authorization security

Ask Time:2016-02-01T11:44:49         Author:dpdragnev

Json Formatter

I am new to Angular and one of the things that I am trying to wrap my head around is the route authorization. I am coming from the .NET/IIS world where route authorization is as simple as decorating your API or MVC controller with the [Authorize] attribute.

I have read several posts and documents on how Angular handles routing. My concern is that the authorization is happening on the client. What prevents the user from firing up the dev tools, breakpoint the script execution, and changing the variables in the authorization service that control whether or not the user is authorized to access this route?

As I mentioned, I am new to Angular, so maybe I have misunderstood how the routing works. If this is the case, please correct me.

So, my question is: How can one achieve the same level of security with Angular routing as you would if using server-side routing authorization?

Thank you.

Author:dpdragnev,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/35122699/angular-routing-authorization-security
yy