The `blade-auth` package provides essential utility functions and helpers designed for integrating authentication services seamlessly into applications built with the Blade framework. As of version 3.29.10, it offers streamlined mechanisms for common authentication patterns, including user registration, sign-in, sign-out, and active session management. The package maintains a relatively frequent release cadence, with recent updates focusing on refining internal 'trigger' syntax, improving documentation accuracy, and enhancing developer experience through features like dependency override support in the build API and improved error handling. Its primary differentiation lies in its deep integration within the Blade ecosystem, aiming to abstract away common authentication complexities and provide a consistent experience aligned with the Blade architectural philosophy. It targets modern JavaScript environments, likely favoring ESM.
npm install blade-authVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the initialization of `blade-auth`, a user signup and sign-in flow, retrieving the current session, and finally signing out.
Review the official Blade documentation for the updated trigger syntax introduced in 3.29.0 and refactor existing trigger configurations accordingly. Pay close attention to how triggers are declared and loaded.
Standardize all trigger names and references to use kebab-case (e.g., `my-auth-trigger` instead of `myAuthTrigger`).
Ensure your project is a Blade application and `blade-auth` is integrated as intended by the framework's documentation. Avoid standalone usage without understanding its dependencies on the Blade runtime.
Update your trigger definitions to comply with the simplified trigger syntax introduced in `blade-auth` v3.29.0. Consult the latest Blade documentation for examples.
Always check if the session object returned by `getAuthSession()` is defined and its properties (like `isAuthenticated`) exist before accessing them. Ensure `initAuth` is called before any other auth operations.
Double-check the provided credentials. If this error persists, investigate the server-side authentication logs or ensure the `apiBaseUrl` provided to `initAuth` points to the correct authentication endpoint.
No dependency data recorded yet.