@growthpal/bifrost
v1.5.3
Published
An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.
Downloads
5
Readme
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.