Django Rest not working with session authentication

Viewed 936

I am using django Rest framework with following code

authentication_classes = (SessionAuthentication,
                          JSONWebTokenAuthentication,
                          )

and it settings

REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'rest_framework.authentication.SessionAuthentication',
        'rest_framework.authentication.BasicAuthentication',
        'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
    ),

When i visit the authenticated url then it says Authrization credentails not provided . Then i click on login.

The problem is after successfully logging in i still see authorization credentails not provided . I have to refresh page 2-3 times and then i am authenticated.

I don't know whats the issue

0 Answers
Related