Skip to content

doubleleft/hook-javascript-oauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hook-javascript-oauth

hook-javascript plugin for OAuth integration. With less than 5kb minified.

How to use

View documentation for configuration examples.

var hook = new Hook.Client({/* browser credentials */})

// login with twitter
$('#twitter-login').click(function(e) {
  hook.oauth.popup('twitter').then(function(data) {
    console.log("Success!", data);
  }).otherwise(function(err) {
    console.log("Canceled!", err);
  });
});

// login with facebook
$('#facebook-login').click(function(e) {
  hook.oauth.popup('facebook').then(function(data) {
    console.log("Success!", data);
  }).otherwise(function(err) {
    console.log("Canceled!", err);
  });
});

Building

npm install
npm run build

License

MIT

About

OAuth plugin for JavaScript Hook.Client.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published