when user is not active..endpoint does not shows "User account is disabled"
???????
if all(credentials.values()):
user = authenticate(**credentials)
if user:
if not user.is_active:
msg = _('User account is disabled.')
raise serializers.ValidationError(msg)
payload = jwt_payload_handler(user)
return {
'token': jwt_encode_handler(payload),
'user': user
}
else:
msg = _('Unable to log in with provided credentials.')
raise serializers.ValidationError(msg)
when user is not active..endpoint does not shows "User account is disabled"
??????? if all(credentials.values()): user = authenticate(**credentials)