@nitra/auth-m2m
v2.0.0
Published
Machine to Machine (M2M) Authorization
Downloads
181
Readme
@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