Understanding client-side authentication

First of all, we are going to use token-based authentication for both local users (e-mail/password) and social logins (OAuth). If the users choose to log in through a social network, it is done through OAuth. However, once the identity of the user is confirmed, the rest of the process is token-based.

Authentication is one of the most important parts of our e-commerce application. It not only allows the users to log in, sign up, sign in and sign out, but also allows the app to keep a track of sellers and buyers of each product. Next, we are going to explore how the Angular client exercises the API to save new users/products to the database and to interact with the backend authentication mechanisms.

On the ...

Get Web Application Development with MEAN now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.