Skip to content

VivekHarikrishnan/react-sso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to react-sso 👋

Version Twitter: \_vivek\_hari

A ReactJS package to support SSO based authorization & redirects.

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published