google-provider-login

1.0.13 • Public • Published

google-provider-login

google-provider-login is a helper library for nightwatch.js to login with social provider google. Automate 'login with google' is not so easy, google have more secure and dynamic DOM login popup-interface. Google is now two kind of popup interface and both are completely different. This package lets you the flexibility to logs you into your website through both the login interface. This package works only with nightwatch.js to login with google provider.

Use:


 
     var googleLogin = require('google-provider-login')
 
     /**
      * @param {} client: instance of browser/client. nightwatch current browser instance
      *
      * @param {String} googleEmail: The email you want login from in google
      *
      * @param {String} googlePass: google account password
      *
      * @param {function} callback: a callback function to handle the response
      */
 
 
     @googleLogin.js
 
     client
        .click() //click on google provider,
 
        // Call googleLogin only after opening the provider login popup(window).
 
        .perform(function(client, done){
            googleLogin(client, googleEmail, googlePass, function(res){  //callback function
 
                // If login was successful it will return true otherwise retrun false
 
                console.log(res)   //true/false
 
                /*
                 * Your code based on callback response
                 */
 
            })
        });
        .done(end);
 

/google-provider-login/

    Package Sidebar

    Install

    npm i google-provider-login

    Weekly Downloads

    1

    Version

    1.0.13

    License

    ISC

    Last publish

    Collaborators

    • rkpareek