Back to Open Source
loginradius-react
Table of Contents
Installation
Using npm
Getting Started
Configure the SDK by wrapping your application in :
Use the hook in your components to access authentication state (, and ) and authentication methods ( and ):
Protect a Route
Protect a route component using the higher order component. Visits to this route when unauthenticated will redirect the user to the login page and back to this page after login:
Call an API
Call a protected API with an Access Token:
Using loginWithPopup
To implement functionality in your app you need to perform following steps:
- Open your LoginRadius Admin Console and navigate to .
- In the right side you will find the tab called , expand and select .
- A popup will open where you need to enter this url in the tab - https://hosted-pages.lrinternal.com/Themes/sdk/default-auth-react-sdk.js and click Confirm
- This URL contains the script which will help to close the popup after the authentication is done.
- Finally Click on Save and then add method in your application.
Contributing
We appreciate feedback and contribution to this repo! Before you get started, please see the following:
Support + Feedback
For support or to provide feedback, please raise an issue on our issue tracker.
What is LoginRadius
- LoginRadius was established with the vision of securing the identity of every person on the internet. Over a few short years, we have grown exponentially from a simple social login provider to a multi-faceted, industry-leading customer identity and access management (CIAM) platform.
- The LoginRadius Identity Platform helps companies securely manage customer identities and data to deliver a unified customer experience. We offer suites of modules to serve businesses from startups to Fortune 500 enterprises with hundreds of millions of users.
License
This project is licensed under the MIT license. See the LICENSE file for more info.