Skip to content

Log your users into your application without using a password.

Notifications You must be signed in to change notification settings

handshakejs/handshakejs-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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: '[email protected]', 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: '[email protected]', 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: '[email protected]', 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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published