Skip to content
This repository has been archived by the owner on Jul 5, 2019. It is now read-only.

Commit

Permalink
Remove Facebook2OAuth2 and Facebook2AppOAuth2 backends
Browse files Browse the repository at this point in the history
Closes omab#1045. They are using an endpoint that doesn’t exist anymore,
and the main backends are now more up to date.
  • Loading branch information
Bruno Alla committed Oct 18, 2016
1 parent f13a5cc commit a042773
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

[Full Changelog](https://github.com/omab/python-social-auth/compare/v0.2.21...HEAD)

- Removed Facebook2OAuth2 and Facebook2AppOAuth2 as FacebookAppOAuth2 is now using Graph 2.0

## [v0.2.21](https://github.com/omab/python-social-auth/tree/v0.2.21) (2016-08-15)

**Closed issues:**
Expand Down
8 changes: 0 additions & 8 deletions docs/backends/facebook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@ If you need to perform authentication from Facebook Canvas application:

More info on the topic at `Facebook Canvas Application Authentication`_.


Graph 2.0
---------

If looking for `Graph 2.0`_ support, use the backends ``Facebook2OAuth2``
(OAuth2) and/or ``Facebook2AppOAuth2`` (Canvas application).

.. _Facebook development resources: http://developers.facebook.com/docs/authentication/
.. _Facebook App Creation: http://developers.facebook.com/setup/
.. _Facebook Canvas Application Authentication: http://www.ikrvss.ru/2011/09/22/django-social-auth-and-facebook-canvas-applications/
.. _Graph 2.0: https://developers.facebook.com/blog/post/2014/04/30/the-new-facebook-login/
12 changes: 0 additions & 12 deletions social/backends/facebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,3 @@ def base64_url_decode(data):
if constant_time_compare(sig, expected_sig) and \
data['issued_at'] > (time.time() - 86400):
return data


class Facebook2OAuth2(FacebookOAuth2):
"""Facebook OAuth2 authentication backend using Facebook Open Graph 2.0"""
AUTHORIZATION_URL = 'https://www.facebook.com/v2.0/dialog/oauth'
ACCESS_TOKEN_URL = 'https://graph.facebook.com/v2.0/oauth/access_token'
REVOKE_TOKEN_URL = 'https://graph.facebook.com/v2.0/{uid}/permissions'
USER_DATA_URL = 'https://graph.facebook.com/v2.0/me'


class Facebook2AppOAuth2(Facebook2OAuth2, FacebookAppOAuth2):
pass

0 comments on commit a042773

Please sign in to comment.