knboard icon indicating copy to clipboard operation
knboard copied to clipboard

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

Open JeffreyZZ opened this issue 4 years ago • 1 comments

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 avatar Jul 25 '21 02:07 JeffreyZZ

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

zhan9san avatar Dec 04 '21 11:12 zhan9san