Reputation: 15
I'm new to django and I was trying to learn how to implement token authentication but I want to learn more about it. what is the difference between session and token. How does token/session authentication work in the background and what is the best of the two. I'm trying to learn more about authenticating and stuffs because I will need it to build projects in my portfolio.
Upvotes: 1
Views: 307
Reputation: 739
The difference between session and token, session is a cookie that we will use when we want to enter as user or authenticate so from there you will get session cookies, you can see, inspect there are several menu lines and you select Application when you enter you will see Cookies and a list of your cookie data, tokens are almost the same as regular cookies tokens are used when you want to use 2 platforms, the backend and frontend are the tokens will be stored in the frontend not in the backend and it will be stored LocalStorage
Upvotes: 1