mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-10-24 20:51:13 +03:00
Added a serializer for twitter OAuth to work. If you are not using this it will cause an error ('TwitterOAuthAdapter' object has no attribute 'parse_token'). It happens because method parse_token() is implemented in OAuth2Adapter, but Twitter uses OAuth 1.0, so TwitterOAuthAdapter inherits from OAuthAdapter, which doesn't have parse_token() method. Example usage is given below:
class TwitterLogin(LoginView):
serializer_class = TwitterLoginSerializer
adapter_class = TwitterOAuthAdapter
|
||
|---|---|---|
| .. | ||
| registration | ||
| tests | ||
| __init__.py | ||
| admin.py | ||
| app_settings.py | ||
| models.py | ||
| serializers.py | ||
| social_serializers.py | ||
| urls.py | ||
| utils.py | ||
| views.py | ||