@rhc-shared-components/rhc-sso-tpdh
v1.0.1
Published
project description
Downloads
13
Keywords
Readme
@rhc-shared-components/rhc-sso-tpdh
React Red hat SSO wrapper for Red Hat Certified Apps
Install
yarn add @rhc-shared-components/rhc-sso-tpdh
Usage
import React from 'react'
import { RHCAuthProvider, useRHCAuthContext } from '@rhc-shared-components/rhc-sso-tpdh';
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