fnakstad / angular-client-side-auth

One way to implement authentication/authorization in Angular applications
http://angular-client-side-auth.herokuapp.com/
MIT License
1.63k stars 346 forks source link

Random Questions #78

Open cyprusglobe opened 10 years ago

cyprusglobe commented 10 years ago

wondering if you can use this with firebase simple auth https://www.firebase.com/docs/security/simple-login-email-password.html

https://www.firebase.com/docs/security/simple-login-overview.html

Thanks

fnakstad commented 10 years ago

I haven't tried, but I doubt you can use it with the solution as it presently is in the repo. You need to be able to tweak some of the server-side code to set the user cookie, and from what I can tell you can't do that using this API...

Perhaps you can make it work if you suspend bootstrapping of your Angular app while you fire off an AJAX request to Firebase requesting the current logged in user (as a replacement for the server-side cookie). Then when it responds and you know the user's login status you can bootstrap your Angular application in the callback to the AJAX request.

I'll try to do an experiment on this if I get some more time on my hands :)

cyprusglobe commented 10 years ago

Thanks,

@fnakstad