Фикс авторизации

main
through-your-tears 9 months ago
parent 5c8b1292e9
commit 93ada52277

@ -157,7 +157,7 @@ REST_FRAMEWORK = {
}
SWAGGER_SETTINGS = {
'DEFAULT_AUTHENTICATION': 'authorization.backends.JWTAuthentication',
'DEFAULT_AUTHENTICATION': 'jwtauth.backends.JWTAuthentication',
'SECURITY_DEFINITIONS': {
'Token': {
'type': 'apiKey',

@ -55,7 +55,7 @@ class LoginSerializer(serializers.Serializer):
'A password is required to log in'
)
user = authenticate(email=email, password=password)
user = authenticate(username=email, password=password)
if user is None:
raise serializers.ValidationError(

Loading…
Cancel
Save