Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cordova-plugin-fb-accountkit

prakashvadrevu3MIT0.1.0-beta

Cordova plugin to integrate Facebook Account Kit, which allows passwordless SMS/email authentication

ecosystem:cordova, cordova-android, accountkit, authentication, passwordless, phone, facebook-accountkit

readme

Cordova Facebook Account Kit Plugin

This plugin integrates the Facebook's Account Kit. For more info see Account Kit

This is a WIP. Not recommended for production usage.

Supported platforms

  • Android

Plugin Installation

  • Clone this project
  • Add the plugin to your cordova project with the following command
cordova plugin add <PATH_TO>/cordova-plugin-fb-accountkit --variable FB_APP_NAME=<APP_NAME> --variable FB_APP_ID=<APP_ID> --variable FB_CLIENT_TOKEN=<CLIENT_TOKEN>

API

loginWithPhone

fbAccountKit.loginWithPhone(success, failure, {"type" : "CODE"}); // currently only 'CODE' is supported

Response:

{
    status : "SUCCESS",
    authorizationCode : "<auth-code-string>",
    finalAuthorizationState : "",
    tokenRefreshIntervalInSeconds : 120
}

logout

fbAccountKit.logout(success, failure);

Response:

  • 'success' callback gets called