LoginRadius JavaScript SDK
The LoginRadius JavaScript SDK delivers a lightweight runtime and streamlined customization for any web page — whether you embed it on your own site or deploy it through Auth Studio. It provides full control over authentication flows, UI behavior, and validation without vendor lock-in.
The SDK ships pre-built UI components on top of an embedded auth engine — API client, session management, flow registry, and schema generation. Call LRObject.init('<component>', { container: '#my-div' }) to mount any flow into a DOM container.
When to use
Choose the JavaScript SDK when any of the following apply:
- You build with a framework other than React (Vue, Angular, Svelte, SolidJS, Nuxt, Next.js) or with vanilla HTML.
- You need a single runtime that can be loaded from npm or dropped in via a
<script>tag from the LoginRadius CDN. - You want a managed UI for authentication, profile, and B2B organization management without writing the components yourself.
Prefer the LoginRadius React SDK when your app is React-first and you want idiomatic JSX components plus hooks such as useLRAuth().
Available components
Mount any flow with LRObject.init('<name>', { container: '#my-div' }). The init() name is the action key — use it exactly as shown. Names are organized below by capability area; full per-component reference lives on the Components page.
Authentication and flows
Sign-in, sign-up, social, passwordless, password reset, token verification, and Identity Orchestration workflow components. Use these to render the user-facing entry points of your authentication experience.
| action | Description |
|---|---|
| auth | Combined sign-in and sign-up experience (default entry point) |
| login | Sign-in only |
| registration | Sign-up / registration only |
| socialLogin | Social provider sign-in |
| passwordlessLogin | Passwordless login (magic link or OTP) |
| forgotPassword | Password reset flow |
| verifyToken | Email / token verification |
| adminPortal | Admin portal UI |
| workflow | Identity Orchestration workflow execution |
Profile and account management
Self-service account management surfaces — full profile editor, password and PIN changes, email and phone updates, MFA enrollment, passkey registration, social-account linking, and account deletion. Use these inside an authenticated session to let users manage their own identity data.
| action | Description |
|---|---|
| profileEditor | Full profile editor (account management UI) |
| personalDetails | View and edit personal profile details |
| changePassword | Change account password |
| changePin | Change account PIN |
| editPhone | Update phone number |
| editUsername | Change username |
| addEmail | Add or manage email addresses |
| verifyEmailPhone | Verify email address or phone number |
| setupTwoFactorAuth | Enroll and manage two-factor authentication (MFA) |
| addPasskey | Register a passkey |
| resetBackupCode | Regenerate MFA backup codes |
| linkAccount | Link or unlink social accounts |
| deleteAccount | Delete the user account |
Organization management (B2B)
B2B administration components for managing organizations, members, roles, security policies, SSO/identity connections, SCIM provisioning, verified domains, and organization switching. Use these to power tenant-admin experiences in multi-tenant applications.
| action | Description |
|---|---|
| organizationUsers | Manage organization members |
| organizationRoles | Manage organization roles |
| organizationSecurity | Organization security settings |
| organizationConnections | Manage SSO / identity connections |
| organizationScim | SCIM provisioning configuration |
| organizationSettings | General organization settings |
| organizationDomainManagement | Manage verified domains |
| organizationSelector | Organization selection UI |
| organizationSwitcher | Switch between organizations |
| organizationDangerZone | Destructive organization actions (e.g. delete org) |
Related resources
Get started with the JavaScript SDK
Install, initialize, and render your first auth flow.
Components reference
Pre-built UI components the JavaScript SDK can render.
Options
Reference for the options object shared across every SDK flow.
Customization
Style the SDK UI with CSS classes, style props, and CSS variables.
Localization
Translate the SDK UI copy into any language.
LoginRadius React SDK
React-first integration layer with provider, hooks, and JSX components.