loading
Preparing LoginRadius developer resources
Mission: Help enterprises accelerate digital transformation with our fully-managed Customer IAM technology.
Skip to main content

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.

actionDescription
authCombined sign-in and sign-up experience (default entry point)
loginSign-in only
registrationSign-up / registration only
socialLoginSocial provider sign-in
passwordlessLoginPasswordless login (magic link or OTP)
forgotPasswordPassword reset flow
verifyTokenEmail / token verification
adminPortalAdmin portal UI
workflowIdentity 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.

actionDescription
profileEditorFull profile editor (account management UI)
personalDetailsView and edit personal profile details
changePasswordChange account password
changePinChange account PIN
editPhoneUpdate phone number
editUsernameChange username
addEmailAdd or manage email addresses
verifyEmailPhoneVerify email address or phone number
setupTwoFactorAuthEnroll and manage two-factor authentication (MFA)
addPasskeyRegister a passkey
resetBackupCodeRegenerate MFA backup codes
linkAccountLink or unlink social accounts
deleteAccountDelete 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.

actionDescription
organizationUsersManage organization members
organizationRolesManage organization roles
organizationSecurityOrganization security settings
organizationConnectionsManage SSO / identity connections
organizationScimSCIM provisioning configuration
organizationSettingsGeneral organization settings
organizationDomainManagementManage verified domains
organizationSelectorOrganization selection UI
organizationSwitcherSwitch between organizations
organizationDangerZoneDestructive organization actions (e.g. delete org)