Authentication recommendations in Angular 2+

0

I'm looking at the issue of angular authentication, either logging in, or registering using APIs such as Google or Facebook.

I am currently using the latest version of Angular 5, and I am in doubt about what kind of authentication should be done. I have seen that it is easy with Firebase Auth, but they also told me that there are problems with SEO or something like that. They did not finish explaining me well, so, what good practices or frameworks are better in terms of their security, ease or flexibility, and why?

As an extra, I am also interested in an example or tutorial of this type of authentication.

    
asked by Anthony Rosas 18.02.2018 в 02:16
source

3 answers

0

Check the google and facebook documentation that tells you what to do to authenticate from your application.

google: enter the description of the link here

facebook: enter the description of the link here

github facebook: link

    
answered by 22.02.2018 в 21:23
0

Personally I would recommend you to use Firebase for the Auth, it's easier and you save a lot of time. You can check here at the doc you have options, from Github to anonymous authentication

    
answered by 17.03.2018 в 16:18
0

Angular is a stable, robust and secure framework. For authentication, as you have already commented some colleagues, it is very useful to use Firebase for the entire backend (not only authentication, but you can also use persistence, storage, hosting, push notifications ...). As for authentication, it allows you to use several providers:

If you use firebase, you must install AngularFire , because it will help you in the development and integrates perfectly with Angular, as well as offering you advantages thanks to TypeScript (intellisense, types, etc).

Regarding SEO, it is true, and there are problems due to the very nature or technology of the SPA ( Single Page Application , which are rendered only in the client), and when the crawlers or spiders pass by the application, they are not able to understand it correctly. For this you can also implement the SSR technique ( Server Side Rendering ) with Angular to support SEO, although you will have to do more things, such as mounting a backend with NodeJS. I leave a link here .

I hope I could have helped you, if you have any questions, leave a comment.

    
answered by 22.06.2018 в 01:52