bouquet-auth-js
v1.0.0
Published
Authentication Javascript library for Bouquet API
Downloads
3
Readme
Bouquet Authentication Javascript library
Universal Javascript library to simplify Authentication for Browser Apps using Bouquet API.
Exports in a UMD format it works either in the browser or node.js
Usage
Using the bouquet-auth.js in an html page
<script src='../dist/bouquet-auth.min.js'></script>
<script>
var auth = new Auth({
apiUrl : 'your-bouquet-url',
clientId : 'your-bouquet-client-id',
autoRedirect : false
});
auth.start()
.then(function(user) {
// user logged in
})
.catch(function(exception) {
// auth failed
});
</script>
Scripts
npm run build
- produces production (minified) version thedist
foldernpm run dev
- produces development version and runs a watchernpm run test
- runs the testsnpm run test:watch
- runs the tests in a watch mode