1.5.3 • Published 8 months ago
@growthpal/bifrost v1.5.3
Project Name
A connector package to connect multiple growthpal services with heimdall (In house Auth Service)
Installation
npm install @growthpal/bifrost
yarn add @growthpal/bifrost
pnpm add @growthpal/bifrost
Prerequisites
- Growthpal approved service
- Growthpal auth domain
Usage
TokenValidator
CommonJS
import { TokenValidator } from '@growthpal/bifrost';
const tokenValidator = new TokenValidator(token, domain)
tokenValidator.decodeAccessToken()
ES Modules
const { TokenValidator } = require('@growthpal/bifrost');
const tokenValidator = new TokenValidator(token, domain)
tokenValidator.decodeAccessToken()
Bifrost
ES Modules
import { Bifrost } from '@growthpal/bifrost';
const bifrostService = new Bifrost(token, domain)
const userData = await bifrostService.getUserById(userId);
CommonJS
const { Bifrost } = require('@growthpal/bifrost');
const bifrostService = new Bifrost(token, domain)
const userData = await bifrostService.getUserById(userId);
License
See the LICENSE.md file for details.