@nitra/auth-m2m

2.0.0 • Public • Published

@nitra/auth-m2m

Use without cache:

import { getGraphQLClient } from '@nitra/auth-m2m'

const qlClient = await getGraphQLClient('remote_gt', 'secret')

Use with cache:

import { getGraphQLClient } from '@nitra/auth-m2m'
import KeyvFirestore from 'keyv-firestore'

const store = new KeyvFirestore({
  collection: process.env.CACHE_COLLECTION
})

const qlClient = await getGraphQLClient('remote_gt', 'secret', store)

with process.env.KID === 'dev' getGraphQLClient return token without backend query

Readme

Keywords

none

Package Sidebar

Install

npm i @nitra/auth-m2m

Weekly Downloads

38

Version

2.0.0

License

ISC

Unpacked Size

3.79 kB

Total Files

5

Last publish

Collaborators

  • vitaliytv