handshakejs / handshakejs-js

Log your users into your application without using a password.

Repository from Github https://github.comhandshakejs/handshakejs-jsRepository from Github https://github.comhandshakejs/handshakejs-js

handshake.js

Handshake.js makes it easy to log your users into your application without using a password.

Handshakejs.setAppName('handshake-js_test');
Handshakejs.setRootUrl('https://handshakejs-api.herokuapp.com');

Handshakejs.login.request({email: 'your@email.com', function(err, res) {
  if ( err ) console.warn( err );
  console.log('login requested: ', res.identities[0].email );
});

This library is part of the larger Handshake.js ecosystem.

Usage

Handshakejs.setAppName(app_name)

Handshakejs.setAppName('handshake-js_test');

Handshakejs.setUrl(root_url)

Handshakejs.setRootUrl('https://handshakejs-api.herokuapp.com');

Handshakejs.login.request({email: email}, callback)

Handshakejs.login.request({email: 'your@email.com', function(err, res) {
  if ( err ) console.warn( err );
  console.log('login requested: ', res.identities[0].email );
});

Handshakejs.login.confirm({email: email, authcode: authcode}, callback)

Handshakejs.login.confirm({email: 'your@email.com', authcode: '1234'}, function(err, res) {
  if ( err ) console.warn( err );
  console.log('login confirmed: ', res.identities[0].hash );
});

Testing

Open test/index.html

About

Log your users into your application without using a password.


Languages

Language:JavaScript 100.0%