Wondering what’s next for npm?Check out our public roadmap! »

    authentication4js

    2.0.893 • Public • Published

    Wix Restaurants Authentication JavaScript Client

    NPM version Downloads

    This client library is used to authenticate with the Wix Restaurants API.

    Usage

    Install the library with npm install authentication4js

    var AuthenticationClient = require('authentication4js').Authentication;
    
    var authenticationClient = new AuthenticationClient({
      XMLHttpRequest: window.XMLHttpRequest
    });
    
    // Authenticate with Wix instance
    authenticationClient.wix({
      instance: 'some-wix-instance',
      appKey: 'some-wix-app-key'
    }).then(function(loginResponse) {
      console.log(loginResponse.user);
      console.log(loginResponse.accessToken);
    });
    
    // Authenticate with Google
    authenticationClient.google({
      clientId: 'some-client-id',
      idToken: 'some-id-token'
    }).then(function(loginResponse) {
      console.log(loginResponse.user);
      console.log(loginResponse.accessToken);
    });

    Reporting Issues

    Please use the issue tracker to report issues related to this library.

    License

    This library uses the Apache License, version 2.0.

    Install

    npm i authentication4js

    DownloadsWeekly Downloads

    7

    Version

    2.0.893

    License

    Apache-2.0

    Unpacked Size

    50.7 kB

    Total Files

    13

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar