Commit Graph

5 Commits

Author SHA1 Message Date
mariodev
c5e0382d25 Increased test coverage (#229)
* Added twitter login test

* pep8

* Fixes missing backend attr issue

* Refactored login process

* pep8

* Added more tests for twitter social login
2016-07-18 07:06:28 +02:00
Mario Rodas
0737da0077 Capture OAuthError in TwitterLoginSerializer 2016-03-02 15:00:26 -05:00
Mario Rodas
86a487fe21 Import allauth.socialaccount only when declared in INSTALLED_APPS
Don't silently ignore ImportError
2016-03-02 14:37:27 -05:00
Tevin Joseph K O
b2edfffc91 fixed pep8 error in social_serializers
fixed pep8 error in social_serializers which cause documentation build error
2016-02-23 17:52:44 +05:30
Tevin Joseph K O
1af16ae7ba Added a Serializer for Twitter oauth
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
2016-01-13 12:43:12 +05:30