We could do something as Django does and saving the token in the database, then checking it and deleting it when the user wants to logout.
But, I'm more oriented to frontend development, so I would handle this on the frontend, we would store the token in the storage or something then at the time we logout we just delete the token from the storage.
There are a lot of ways of handling this actions and all are valid, you just need to find the one that fits you!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, thank you too!
We have many ways to handle logout:
We could do something as Django does and saving the token in the database, then checking it and deleting it when the user wants to logout.
But, I'm more oriented to frontend development, so I would handle this on the frontend, we would store the token in the storage or something then at the time we logout we just delete the token from the storage.
There are a lot of ways of handling this actions and all are valid, you just need to find the one that fits you!