Seneca Stytch-Provider is a plugin for Seneca
Provides access to the Stytch API using the Seneca provider convention. Stytch API entities are represented as Seneca entities so that they can be accessed using the Seneca entity API and messages.
See seneca-entity and the Seneca Data Entities Tutorial for more details on the Seneca entity API.
NOTE: underlying third party SDK needs to be replaced as out of date and has a security issue.
This open source module is sponsored and supported by Voxgig. |
---|
// Setup - get the key value (<SECRET>) separately from a vault or
// environment variable.
const seneca = Seneca({ legacy: false })
.test() // sets up the Seneca instance for testing: easier to read layout
.use('promisify')
.use('entity')
// Get API keys using the seneca-env plugin
.use('env', {
var: {
$STYTCH_PROJECTID: String,
$STYTCH_SECRET: String,
}
})
.use('provider', {
provider: {
stytch: {
keys: {
project_id: { value: '$STYTCH_PROJECTID' },
secret: { value: '$STYTCH_SECRET' },
}
}
}
})
// load up the 'provider/stytch/user' entity
.use('stytch-provider')
// it is recommended that you get seneca instance 'ready' before moving on
await seneca.ready()
$ npm install @seneca/stytch-provider @seneca/env seneca-entity @seneca/provider seneca-promisify
None.
- "role":"entity","base":"stytch","cmd":"list","name":"session","zone":"provider"
- "role":"entity","base":"stytch","cmd":"list","name":"user","zone":"provider"
- "role":"entity","base":"stytch","cmd":"load","name":"user","zone":"provider"
- "role":"entity","base":"stytch","cmd":"remove","name":"user","zone":"provider"
- "role":"entity","base":"stytch","cmd":"save","name":"user","zone":"provider"
- "sys":"provider","get":"info","provider":"stytch"
No description provided.
List Stytch data into an entity
Load Stytch data into an entity
Remove Stytch data from an entity
Update/Save Stytch data into an entity
Get information about the Stytch SDK.