promisify-auth0-js
Promisifying wrapper around the Client Side Javascript toolkit for Auth0 API
Install
From npm
npm i --save promisify-auth0
Basic Usage
The package is mirroring the original auth0.js API. The only difference is that instead of NodeJS callback function style, promisify-auth0
allows you to get Promise<T>
instead which help avoid callback hell and play nicely with async/await
.
You will still need to create an original Auth0 objects and inject them into the corresponding wrapping types, something like this:
;; ;; ; authentication.loginoptions .then .catch;
The last piece of code could be rewritten in a more imperative style while maintaining the asyncronous execution model.
try catch caughtError
License and other
This code is distributed under MIT license.
Please respect the Code of Conduct.
Feel free to contribute.