From the course: Securing ASP.NET Core Apps: Advanced Techniques for Web Application Security

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Token-based authentication

Token-based authentication

- [Instructor] Token-based authentication is the last authentication type that we're going to talk about in this course. To better understand token-based authentication, let us quickly compare with the cookie-based authentication. In the cookie-based authentication, the user provides the credentials. The server then will validate these credentials, and if credentials are valid, a session is created in the server, and this session ID is returned to the user. Now, this session ID is stored in a cookie, and for each request, the cookie is attached to the request, so then the session ID is validated in the server if it's valid or not. Because this session ID is stored in a cookie, we do call this authentication type cookie-based authentication. Now, as you can see, for each logged in user, there is a session in the server. Now, as you can imagine, when millions of users log in, this server will get overloaded. In token-based…

Contents