Convenience library for initializing Google Identity Toolkit widgets
var gitkit = require('gitkit-widgets');
var config = {
loginUrl: '/login',
logoutUrl: '/',
popup: true
};
gitkit.login('#loginButton', config, function(err){
// button is ready
});
Attach a login widget, configured by options
, to all elements that match the selector
.
Any valid selector to pass to document.querySelectorAll
.
Optional configuration for the login button. Takes any of the Gitkit widget options or nicer options as defined below.
Note: all Gitkit widget option names take precedence over the names below.
The location a user is redirected to during login. The location must contain a login widget.
The location a user is redirected to during logout.
Whether the login page should show in a popup or not.
The cookie where a user's login token is saved.
Optional callback that is invoked upon completion of login button construction.
MIT