palmettoflow-auth0
v2.0.1
Published
[![Build Status](https://travis-ci.org/twilson63/palmettoflow-auth0-svc.svg?branch=master)](https://travis-ci.org/twilson63/palmettoflow-auth0-svc)
Downloads
3
Maintainers
Readme
Palmetto Flow Service for Auth0
This service manages Auth0 Api through the Palmetto Flow.
Node v4 and greater is required for this module
Configuration
var palmetto = require('@twilson63/palmetto-couchdb')
var ee = palmetto({
endpoint: palmettoConfig.endpoint,
app: palmettoConfig.app
})
var svc = require('palmettoflow-auth0')({
domain: '_DOMAIN_',
token: '_TOKEN_'
})
svc(ee)
Api methods currently implemented:
- Get User
var newEvent = require('palmettoflow-event').newEvent
var ne = newEvent('auth0/user', 'get', { userId: '123456' })
ee.on(ne.from, function (event) {
if (event.verb === 'update-error') {
// handle error
}
// result
})
ee.emit('send', ne)
- Update User
For more info on updatable user properties, visit the Auth0 docs
var newEvent = require('palmettoflow-event').newEvent
var reqData = {
userId: '123456',
userData: {
email: '[email protected]'
}
}
var ne = newEvent('auth0/user', 'update', reqData)
ee.on(ne.from, function (event) {
if (event.verb === 'update-error') {
// handle error
}
// result
})
ee.emit('send', ne)