Coder Social home page Coder Social logo

node-accountkit's Introduction

node-accountkit

Account Kit helps you quickly register for apps using just your phone number or email address โ€” no password needed. It's reliable, easy to use and gives you a choice about how you sign up for apps.

node-accountkit is a nodeJS module to handle accountkit server side implementation.

Full documentation for account kit can be found here https://developers.facebook.com/docs/accountkit/web

Version

1.1.6

Installation

npm install node-accountkit

Usages

Step 1 Include module to your server.js

var Accountkit = require ('node-accountkit');

Step 2 Configure account kit.

Accountkit.set ("APP_ID", "ACCOUNT_KIT_APP_SECRET", "API_VERSION"); //API_VERSION is optional, default = v1.1
Accountkit.requireAppSecret (true); // if you have enabled this option, default = true

More information https://developers.facebook.com/apps/

Step 4 Use it.

//authorization_code are the authorizaition code that we get from account kit login operation. look for sample app for more usage information.
Accountkit.getAccountInfo (authorization_code, function(err, resp) {
    /**
    {
        "email": {
            "address": "[email protected]"
        },
        "id": "941488975973375"
    }
    */
});
// Account Removal
//accountId is accountkit user id
Accountkit.removeUser(accountId, function(err, resp){
    /**
    {
        "success": true
    }
    */
});

Methods

  • accountkit.getAccountInfo (authorization_code, callback);
  • removeUser (id, callback);

Contribute

Feel free to fork it on Github :)

node-accountkit's People

Contributors

filippodossena-mozart avatar goyalshubham13 avatar taina0407 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.