@mybiogen/auth-openid
TypeScript icon, indicating that this package has built-in type declarations

1.8.3 • Public • Published

auth-openid

Quickstart

1. Install (assuming the private npm registry is already set up)

yarn add @mybiogen/open-authid

2. Create JanrainJS instance.

import JanrainJS from '@mybiogen/open-authid'

const janrain = new JanrainJS(JANRAIN_CLIENT_ID, JANRAIN_CONFIG_URL, JANRAIN_REDIRECT_URI)

Note: JANRAIN_CLIENT_ID, JANRAIN_CONFIG_URL and JANRAIN_REDIRECT_URI are required params.

API Summary

janrain.login() (): void User login method.
janrain.logout() async (): Promise<void> User logout method.
janrain.watchAuth(callback) async (cb: WatchAuthCallback): Promise<void> Method for watching the changes in authentication status.
janrain.getUserInfo() async (): Promise<JanrainUserInfo or undefined> Method for retrieving user information.
janrain.refreshToken() async (): Promise<Init or undefined> Method for refreshing authentication token.

Available types

import { Token, JanrainUserInfo, WatchAuthCallback, Init, ConfigEndpoint } from '@mybiogen/open-authid';

Readme

Keywords

none

Package Sidebar

Install

npm i @mybiogen/auth-openid

Weekly Downloads

10

Version

1.8.3

License

MIT

Unpacked Size

109 kB

Total Files

36

Last publish

Collaborators

  • andrew.mozharovski
  • ahazen0
  • rzeczkowskip
  • rstepien
  • mbogacz-kaliop
  • dariusz_diemientiew
  • jfevrier-biogen
  • johnandblue