open-ecommerce-api/store-engine

User session logout

Closed this issue · 1 comments

We are using both TokenAuthentication and Session Authentication methods to authenticate users. this allows both browser-based clients and non-browser clients (which typically use token authentication) to access the API.

But, in the logging out process at the Logout endpoint, we are only deleting the user's token which is only for logging token authentication out. We also need to logout the client's sessions if the client is using session auth

This can be done by Django's built-in function logout which can be imported from django.contrib.auth

That's true, thanks