@rhc-shared-components/rhc-sso
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@rhc-shared-components/rhc-sso

React Red hat SSO wrapper for Red Hat Certified Apps

NPM JavaScript Style Guide

Install

yarn add @rhc-shared-components/rhc-sso

Usage

import React from 'react'

import { RHCAuthProvider, useRHCAuthContext } from '@rhc-shared-components/rhc-sso';

const Child = () => {
  const {isAuthenticated} = useRHCAuthContext();
  console.log(isAuthenticated);
  return <div>
    {isAuthenticated ? "User authenticated" : "User is not authenticated"}
  </div>
};

const App = () => {
  return <RHCAuthProvider>
    <Child/>
  </RHCAuthProvider>
};

export default App;

License

MIT © gautamkrishnar

Readme

Keywords

none

Package Sidebar

Install

npm i @rhc-shared-components/rhc-sso

Weekly Downloads

18

Version

2.0.0

License

MIT

Unpacked Size

178 kB

Total Files

8

Last publish

Collaborators

  • swsoni
  • ayushi_midha
  • recampos
  • eyevana
  • kipatil-1
  • shkale
  • bdone
  • gkr-redhat