ng-token-auth
ng-token-auth copied to clipboard
Support authenticate with facebook access token
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