0.2.3 ā€¢ Published 4 years ago

react-sso v0.2.3

Weekly downloads
22
License
-
Repository
-
Last release
4 years ago

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

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Show your support

Give a ā­ļø if this project helped you!