@reapit/login-with-reapit
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Login With Reapit

A button component for logging in with reapit-connect-session.

Install

$ yarn add @reapit/login-with-reapit
$ npm i --save @reapit/login-with-reapit

Usage

import { reapitConnectComponent } from '@reapit/login-with-reapit'

const connectHasSessionCallback = (reapitConnectBrowserSession) => {
  reapitConnectBrowserSession.connectSession().then(session => {
    console.log('Session is', session)
  })
}

reapitConnectComponent({
  connectClientId: '', // Your client Id
  connectOAuthUrl: 'https://connect.reapit.cloud', // Our OAuth url
  connectLoginRedirectPath: '', // Your logout page path (when logging in)
  connectLogoutRedirectPath: '/login', // Your login page path (when logging out)
  rootElement: document.querySelector('#reapit-connect-component'), // Your Element on the page
  connectHasSessionCallback, // The callback for when the session is created
  companyName: "Test Company", // Your Company name
})

Readme

Keywords

none

Package Sidebar

Install

npm i @reapit/login-with-reapit

Weekly Downloads

4

Version

1.0.6

License

none

Unpacked Size

636 kB

Total Files

3

Last publish

Collaborators

  • chowells
  • plittlewood-reapit
  • wmcvayreapit
  • dawsonscott