npm install sphinx-js``javascript
/*
Data can be retrieved from the API either using callbacks (as in versions < 1.0)
or using a new promise-based API. The promise-based API returns the raw Axios
request promise.
*/
var Sphinx = require('sphinx-js');
const spx = new Sphinx();
let auth = spx.getAuthenticate();
auth.authenticate('github')
.then(res => {
// Promise !
// Do something
})
`
https://bluehack-core.github.io/sphinx-js/
or [unpkg][unpkg].`shell
npm install sphinx-js
``html
`Compatibility
sphinx-js is tested on Node.js:
* 6.xNote:
sphinx-js` uses Promise, hence it will not work in Node.js < 4 without polyfill.