From the course: ASP.NET Core: Token-Based Authentication
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Cookie-based vs. token-based authentication - ASP.NET Core Tutorial
From the course: ASP.NET Core: Token-Based Authentication
Cookie-based vs. token-based authentication
- [Instructor] On this course, you learn about the token-based authentication, but the traditional way of authenticating users in a web application is by using the cookie-based authentication. But what are the key differences between the traditional cookie-based authentication and the token-based authentication? In the cookie-based authentication, you typically have a browser and a server. And if you want to be authenticated, you'd send the username and the password to the server. Let's say by using an API endpoint /authenticate, then the server is going to check if the credentials are correct. And if the credentials are correct, then the server is going to create a session in the server memory. Then it is going to return to the user that sessionId. Now this sessionId gets stored in a cookie in the browser, and that is why we call this authentication type cookie-based authentication because the sessionId gets stored in…