In most real-world scenarios, you will want to have full control over the UI. In these cases, you can use FRAuth to obtain typed callback instances from authentication trees and render the UI in whatever way makes sense for your application.
You can run this sample app with the npm run start:embedded-login command. Please see the Getting Started instructions for more details.
-
Setup CORS support in an Access Management (AM) instance.
See Enabling CORS Support in the Documentation.
-
Create an authentication tree in AM.
See Creating a User Authentication Tree in the Documentation.
-
Clone this repo:
git clone https://github.com/ForgeRock/forgerock-javascript-sdk.git -
In the root folder of the repo, use NPM to install dependencies:
npm install -
Open
samples/embedded-login/.env.example. Copy the file in the same directory and name it.env. Fill in the values in this file with your values. -
Run the Embedded Login application
npm run start:embedded-login -
Edit your
/etc/hostsfile to point your localhost (e.g.127.0.0.1) tosdkapp.example.com -
In a supported web browser, navigate to https://sdkapp.example.com:8443