Created
October 15, 2014 18:42
-
-
Save dkwasniak/3ae50f1e22dce966a7a9 to your computer and use it in GitHub Desktop.
authentication
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @psa('social:complete') | |
| def register_by_access_token(request, backend): | |
| # This view expects an access_token GET parameter, if it's needed, | |
| # request.backend and request.strategy will be loaded with the current | |
| # backend and strategy. | |
| token = request.GET.get('access_token') | |
| user = backend.do_auth(request.GET.get('access_token')) | |
| if user: | |
| login(request, user) | |
| return 'OK' | |
| else: | |
| return 'ERROR' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@avonil instead of
backend.do_authtryrequest.backend.do_auth