Firebase (Google) Authentication with Angular + Guards (source code included)
HTML-код
- Опубликовано: 26 окт 2024
- Hi, in this video we'll take a look at Authenticating with Firebase Google Sign-in provider and how to block routes for unauthenticated users with Angular Guards.
Source Code: github.com/bra...
I needed to combine the angular-firebase guards with one of my own for my application thanks to this video I was able to get it working. Thanks a lot.
I was more than 20 hours looking for this solution!!!
Nothing work until find you solution, Thanks!
Amazing and so fast !!! Thank you very much, I appreciate your work. 🙏
thanks! was very helpful in my project
what versions of angular and angular/fire are you using?
Hi there, why am I encountering a scenario wherein the authState is becoming null after refreshing the page.?
I hope you could help
you should create a method for autoSignIn and in that save the user details,token in local storage. See the Ux trendz channel on that playlist is there.
Thanks x 100
Thank you!
import firebase from ''firebase/app' not working
have the same error, any solution?
For me too. Can anyone help us
maybe u don't have matching firebase - angular versions
Same
import firebase from 'firebase/compat';
change for...
import firebase from 'firebase/compat/app';
how is environment being used can u explain ??
thank you
how do i create email and password?
For that you need to enable Email/Password in your Sign-in providers in firebase. Take a look at firebase docs for more info: firebase.google.com/docs/auth/web/password-auth#web-v8
@@ProjectBrackets Thank you very much, how can I do so as soon as I press login to go to the home page?
@@jd-code It depends on how you implemented things. One way is to use onAuthStateChanged which is coming from the Auth object. Then inside you can check if the user object exists then redirect the user to home page via the router.