Just to be sure: cookiecutter-django does not have a logout endpoint, right?

150 Views Asked by At

Cookiecutter-django have endpoints /auth-token/ to get a token and /api/users/me/ for getting user info. But it does not seem to have a logout endpoint. Am I right?

And, if the serverside logout is needed, i will need to write it.

Can you confirm? Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

It looks like you are referring to the DRF part of the cookie cutter. There is no logout, what you want to do is write some endpoint that will delete/invalidate the instance of the respective Token model from your database.

If you are referring to the non-DRF part, there is a logout at /accounts/logout/.