0.2.3 ā¢ Published 4 years ago
react-sso v0.2.3
A ReactJS package to support SSO based authorization & redirects.
š Homepage
Install
npm install react-sso
Usage
import { SSOCallbackHandler } from 'react-sso';
<SSOCallbackHandler loader={{
show: () => showLoaderJSFunc(),
hide: () => hideLoaderJSFunc()
}}
redirectTo={{
authorized: "/landing_page",
unauthorized: "/unauthorized"
}}
sessionHandler={sessionHandlerJSFunc}
token_endpoint_url={"https://your_domain_token_endpoint_url"}
config={{
client_id: "oauth_client_id",
client_secret: "oauth_client_secret",
redirect_uri: window.location.origin + "/auth/callback",
"scope": "profile",
"grant_type": "authorization_code"
}}
auth_header={true}
WrapperComponent={<div>We authorizing you, please wait a moment</div>} />
Author
š¤ Vivek Harikrishnan
- Website: https://github.com/VivekHarikrishnan
- Twitter: @_vivek_hari
- Github: @VivekHarikrishnan
š¤ Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page.
Show your support
Give a āļø if this project helped you!