1.0.0 • Published 7 years ago

bouquet-auth-js v1.0.0

Weekly downloads
11
License
-
Repository
github
Last release
7 years ago

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 the dist folder
  • npm run dev - produces development version and runs a watcher
  • npm run test - runs the tests
  • npm run test:watch - runs the tests in a watch mode