The ForgeRock Login Widget is an all-inclusive UI component for adding authentication, user registration, and other self-service flows to your web applications.
It works with React, Vue, Angular, Svelte, and vanilla JavaScript — any modern client-side JavaScript framework. It does not currently support server-side rendering (SSR) or Node.js.
The widget uses the ForgeRock SDK for JavaScript internally and adds a UI rendering layer with state management. This rendering layer is built with Svelte and Tailwind, but both are compiled away — the resulting widget is framework-agnostic with no runtime dependencies.
Install the widget:
npm install @forgerock/login-widgetImport the CSS and widget, configure, and instantiate:
import '@forgerock/login-widget/widget.css';
import Widget, { configuration, journey } from '@forgerock/login-widget';
const config = configuration();
config.set({
forgerock: {
serverConfig: {
baseUrl: 'https://your-tenant.forgeblocks.com/am/',
timeout: 3000,
},
},
});
new Widget({ target: document.getElementById('widget-root') });
journey().start();For the full API reference — including modal/inline form factors, component lifecycle, user management, styling, and content configuration — see the Widget API Documentation.
This repository is a pnpm monorepo with the following structure:
forgerock-web-login-framework/
├── packages/login-widget/ # @forgerock/login-widget — published to npm
├── apps/login-app/ # SvelteKit demo & documentation app
├── core/ # Shared stores, components, and utilities
└── e2e/ # Playwright end-to-end tests
| Directory | Description | README |
|---|---|---|
packages/login-widget |
The published npm package. Contains the widget source, Storybook stories, and Vitest unit tests. | Widget README |
apps/login-app |
A SvelteKit application used for development, documentation, and E2E test hosting. | App README |
core |
Shared TypeScript modules (stores, journey logic, OAuth, i18n) consumed via path aliases. Not a workspace — imported directly. | Core README |
e2e |
Playwright E2E test suite run across macOS and Ubuntu in CI with 4-shard parallelism. | E2E README |
Prerequisites: Node.js >= 20, pnpm >= 10
# Clone and install
git clone https://github.com/forgerock/forgerock-web-login-framework.git
cd forgerock-web-login-framework
pnpm install
# Run the development app
pnpm dev
# Build the widget
pnpm build:widget
# Run unit tests
pnpm test
# Run linting and formatting
pnpm check:lintFor detailed contributor instructions, see CONTRIBUTING.md. For test documentation, see TESTING.md.
Documentation for the Login Widget is provided at ForgeRock Backstage, and includes topics such as:
- Instantiate the inline form factor
- Theme the widget
- API Reference
- Suspend journeys with "magic links"
- Log in with social authentication
- Log in with OATH one-time passwords
If you encounter any issues, be sure to check our Troubleshooting pages.
Support tickets can be raised whenever you need our assistance; here are some examples of when it is appropriate to open a ticket (but not limited to):
- Suspected bugs or problems with ForgeRock software.
- Requests for assistance — please look at the Documentation and Knowledge Base first.
You can raise a ticket using BackStage, our customer support portal that provides one-stop access to ForgeRock services.
We welcome contributions! Please see CONTRIBUTING.md for development setup, workflow, and conventions.
This code is provided by ForgeRock on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. ForgeRock does not represent or warrant or make any guarantee regarding the use of this code or the accuracy, timeliness or completeness of any data or information relating to this code, and ForgeRock hereby disclaims all warranties whether express, or implied or statutory, including without limitation the implied warranties of merchantability, fitness for a particular purpose, and any warranty of non-infringement. ForgeRock shall not have any liability arising out of or related to any use, implementation or configuration of this code, including but not limited to use for any commercial purpose. Any action or suit relating to the use of the code may be brought only in the courts of a jurisdiction wherein ForgeRock resides or in which ForgeRock conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions.
This project is licensed under the MIT License — see the LICENSE file for details.
© Copyright 2022-2025 Ping Identity Corporation. All Rights Reserved.