Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support authenticate with facebook access token #341

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Charlie-Hua
Copy link

@Charlie-Hua Charlie-Hua commented Dec 16, 2016

what's done

$auth.authenticateAccessToken is added to authenticate with access-token obtained by client-side SDK such as $cordovaFacebook.

how

It takes advantage of /auth/:provider/callback path to send access token directly to devise_token_auth/omniauth_callbacks#omniauth_success on the server, which gets authenticated by the OmniAuth::Strategies:FacebookAccessToken middleware.
If the access token is valid, the server responds with user data which will be passed to handlePostMessage so it behaves just like $auth.authenticate

dependencies

lynndylanhurley/devise_token_auth#793
omniauth-facebook-access-token gem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants