The Cidaas JavaScript SDK provides client-side functionality for integrating web applications with the Cidaas Cloud Identity & Access Management solution. It facilitates secure authentication and authorization flows based on industry standards like OAuth 2.0 and OpenID Connect, and supports a comprehensive set of features including Single Sign-On (SSO), Multi-Factor Authentication (MFA) with over 14 methods (e.g., TOTP, FIDO2), passwordless authentication, and various social/enterprise identity providers. The SDK is built upon the `oidc-client-ts` library, abstracting its complexities for Cidaas-specific integrations, allowing developers to focus on application logic rather than intricate identity protocols. The current stable version is 5.1.4. While a precise release cadence is not explicitly stated, the presence of a detailed changelog implies active development and regular updates. Its key differentiators include extensive MFA options, robust security features for Machine-to-Machine (M2M) and IoT scenarios, and a strong emphasis on simplifying complex identity management challenges.
npm install cidaas-javascript-sdkVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Cidaas SDK, handle both login and logout redirect callbacks, and programmatically initiate authentication and logout flows using browser redirects.
Review the official Changelog (`CHANGELOG.md`) and migration guides for your specific version upgrade path before updating the SDK.
Ensure `redirect_uri` and `post_logout_redirect_uri` configured in your SDK precisely match the URLs registered for your client application in the Cidaas Admin UI.
Always include `openid` in your `scope` as it's mandatory for OpenID Connect. Verify that all requested scopes are enabled and granted to your client application in the Cidaas Admin UI.
Explicitly set `userStore: window.localStorage` in your `cidaasConfig` if you need persistent sessions across browser restarts, or understand the implications of `InMemoryWebStorage` for specific use cases.
Migrate your project to use ES Modules with `import` statements. Ensure your build tooling (e.g., Webpack, Rollup, Parcel) is configured to handle ES Modules correctly.
Verify that the `redirect_uri` in your `cidaasConfig` precisely matches one of the 'Redirect URIs' (including protocol, domain, port, and path) configured for your client in the Cidaas Admin UI.
Double-check the `client_id` in your `cidaasConfig` against the 'Client ID' value displayed in the Cidaas Admin UI for your application. Ensure it is copied without extra spaces or characters.
Ensure `authority` is correctly set to your Cidaas tenant's base URL (e.g., `https://yourtenant.cidaas.com`) in your `cidaasConfig`.
Add your application's full base URL (including protocol and port, e.g., `http://localhost:3000`) to the 'Allowed Origins' list for your client application within the Cidaas Admin UI.