@rhc-shared-components/rhc-sso
v2.0.0
Published
project description
Downloads
48
Keywords
Readme
@rhc-shared-components/rhc-sso
React Red hat SSO wrapper for Red Hat Certified Apps
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