Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How safe are angular route guards? [duplicate]

I'm making an online store, and there's an administration part from where you can track orders and modify them.

It is protected by authentication, which is done on a node server, passwords is hashed into DB etc. but I'm worried about the route guard still being bypassed.

like image 878
Simeon Nakov Avatar asked Nov 30 '17 15:11

Simeon Nakov


People also ask

Can we use multiple guards in Angular?

We can use multiple route guards and then the route will only be accessible when all route guards return true. That's it!

Which route Guard is helpful in preventing unauthorized access to a component?

That is called AuthGuard. AuthGuard is used to protect the routes from unauthorized access.


1 Answers

You should be worried.

Route guards provide exactly zero security, like anything else that you implement on the client side. Things you implement on the client side can only be for the users convenience, but not for security.

You need to enforce security on the server side.

like image 81
Günter Zöchbauer Avatar answered Sep 17 '22 13:09

Günter Zöchbauer