I read that since Angular is client based it can't be trusted alone for securing routes, etc. However, I could not find a way to hack it.
Can anyone explain in detail how one might edit the local js files to bypass route guard (or whatever method is used)? How about Firebase Auth, can someone trick Angular into thinking you are another logged in user?
I have example site that uses both. Source code is at this GitHub repo and it's hosted via Firebase at this: URL.
I added some secret messages (obviously not shown in GitHub repo) in the main-page component which is protected by Guard that uses FirebaseUI auth to authenticate users. They will be shown as these statements:
- "Secret message if broke Angular Guard: <secret-msg>"
- This one shows for anyone that can view the component html
- "Secret message if broke Firebase Auth: <secret-msg>"
- This one shows for anyone that can impersonate being logged in as 'admin@nowhere.com'
Can someone see those or explain how hacker might do it? I hope it's clear this post is not trying to encourage hacking, but simply to understand the security model behind Angular & Firebase Auth utilization (I know OAuth itself is secure, but not sure if how I'm using it in the auth.service.ts is).