You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Made the mistake earlier of trying to put the settings variables flat in the settings file. If you look at the top of the page on the documentation, it shows that you have to put them in a dictionary like this:
REST_KNOX = {
'SECURE_HASH_ALGORITHM': 'cryptography.hazmat.primitives.hashes.SHA512',
'AUTH_TOKEN_CHARACTER_LENGTH': 64,
'TOKEN_TTL': timedelta(hours=10),
'USER_SERIALIZER': 'knox.serializers.UserSerializer',
'TOKEN_LIMIT_PER_USER': None,
'AUTO_REFRESH': False,
'EXPIRY_DATETIME_FORMAT': api_settings.DATETME_FORMAT,
}
That fix your problem?
I am trying to set my AUTH_HEADER_PREFIX to Bearer but fails with Error 401 (Unauthorized). My frontend fails to get the Token.
The text was updated successfully, but these errors were encountered: