Skip to content
This repository has been archived by the owner on Jun 12, 2022. It is now read-only.

TokenAuthentication and SessionAuthentication are both enabled but only session auth used? #64

Open
JeffreyZZ opened this issue Jul 25, 2021 · 1 comment

Comments

@JeffreyZZ
Copy link

JeffreyZZ commented Jul 25, 2021

The backend enables both Django TokenAuthentication and SessionAuthentication authentication in settings. I observed that only SessionAuthentication is being used if I visit the page within browser as run the application on my local machine. But strangely, I also see authToken_token table has an entry updated. It seems that TokenAuthentication is enabled but not being returned or used. Correct?

@JeffreyZZ JeffreyZZ changed the title TokenAuthentication and SessionAuthentication run side-by-side? TokenAuthentication and SessionAuthentication are both enabled but only session auth used? Jul 25, 2021
@zhan9san
Copy link
Contributor

zhan9san commented Dec 4, 2021

It seems that TokenAuthentication is enabled but not being returned or used.

Yes, you're correct. IMHO, rest_framework.authentication.TokenAuthentication can be removed.

The returned data format is described in TokenSerializer, and you can find it in dj-rest-auth

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants