Single Sign-On (SSO) is a method that allows users to log in to multiple applications and websites using one set of credentials, such as a username and password, instead of having to authenticate separately for each application.
Visit OneLogin to create a free account (Note: You need a business account to register, and the account is valid free for only 30 days as per current website terms). You can also visit the developer site for documentation.
After successful login, click on the Administration tab.
Navigate to Settings → Branding.
Under Branding, you can upload your company logo, set a background image or color, and preview the portal view.
Go to Users → Users to view existing users or create a new one. You can also register users via an OIDC app.
Navigate to Users → Custom User Fields if you want to create custom fields for your users.
You can enable or disable a user using the simple toggle button available on the user’s profile.
Go to Applications → Applications and create a new app of type OIDC.
In the Configuration tab of your OIDC app, set the Login URL and Redirect URL according to your React app.
Go to the SSO tab inside the OIDC application to copy the Client ID for later use.
Visit the OneLogin React quickstart guide at
developers.onelogin.com/quickstart/authentication/react
to download the sample React app and follow setup instructions.
oidcApi.js
Set your parameters in the React app’s oidcApi.js
file:
These should match the settings you configured in the OIDC app.
If you want new users to sign up using OneLogin, go to
Users → Self Registration and create a new profile.
You’ll need to add public-signup
to the URL. Hitting this URL will open the registration form.
Go to Policies and create a new user policy. Under that policy, visit the MFA tab.
If you opted for specific users, go to
Users → Authentication → User Security Policy and assign your new policy.
You’ve now successfully set up OneLogin SSO in your React application.