partypass

0.0.2 • Public • Published

Partypass

node.js privateparty client

Full documentation at https://partypass.privateparty.dev

Use cases

For anything that happens inside a browser you can use privatepartyjs.

For everything else, whre you have full access to the private key, you can use partypass.

  • Embedded in mobile
  • IoT
  • Server side

Install

npm install partypass

and require it:

const Partypass = require('partypass')

or

import Partypass from 'partypass'

Usage

1. basic

const pass = new Partypass({
  host: "http://localhost:3000",
  key: privKey
})
let session = await pass.create("user")
console.log(session)  // session includes 'account', 'expiresIn', and 'jwt'

2. build and request

You can build a request and make the actual JWT creation separately:

const pass = new Partypass({
  host: "http://localhost:3000",
  key: privKey
})
let built = await pass.build("user")      // build a pass request object
let session = await pass.request(built)   // make an actual request and get the jwt
console.log(session)  // session includes 'account', 'expiresIn', and 'jwt'

Readme

Keywords

none

Package Sidebar

Install

npm i partypass

Weekly Downloads

3

Version

0.0.2

License

ISC

Unpacked Size

511 kB

Total Files

10

Last publish

Collaborators

  • skogard