mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-07-23 05:59:45 +03:00
config error msg
This commit is contained in:
parent
dcd88a3f87
commit
eb616d107a
|
@ -24,7 +24,9 @@ class SocialLoginSerializer(serializers.Serializer):
|
|||
self.adapter_class = getattr(view, 'adapter_class', None)
|
||||
|
||||
if not self.adapter_class:
|
||||
raise serializers.ValidationError('Define adapter_class in view')
|
||||
raise serializers.ValidationError(
|
||||
'Define adapter_class in view'
|
||||
)
|
||||
|
||||
self.adapter = self.adapter_class()
|
||||
app = self.adapter.get_provider().get_app(request)
|
||||
|
@ -39,6 +41,15 @@ class SocialLoginSerializer(serializers.Serializer):
|
|||
self.callback_url = getattr(view, 'callback_url', None)
|
||||
self.client_class = getattr(view, 'client_class', None)
|
||||
|
||||
if not self.callback_url:
|
||||
raise serializers.ValidationError(
|
||||
'Define callback_url in view'
|
||||
)
|
||||
if not self.client_class:
|
||||
raise serializers.ValidationError(
|
||||
'Define client_class in view'
|
||||
)
|
||||
|
||||
if not self.callback_url:
|
||||
raise serializers.ValidationError(
|
||||
'Define callback_url in view'
|
||||
|
|
Loading…
Reference in New Issue
Block a user