I am trying to configure token authentcation on django-rest-framework. I have added the appropriate settings, and set
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.TokenAuthentication',
)
and the authentication works perfectly from the browser client or curl.
However if I try to use the browseable API, I get 401 unauthorized errors. The login page is available, but just doesn't actually seem to log me in. If I add session authentication:
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.TokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
)
the browseable API works, but token requests fail with Unauthorised errors. Does anyone have a solution to this?