User Auth Data & Events
The User Auth drop-in emits authentication state changes, enabling other drop-ins to respond to login, logout, and authentication validation events across your storefront.
Version: 2.1.5
Events reference
Drop-ins communicate via the event bus.
| Event | Direction | Description |
|---|---|---|
| auth/error | Emits | Emitted when an error occurs. |
| auth/group-uid | Emits | Emitted when a specific condition or state change occurs. |
Event details
auth/error (emits)
Emitted when an error occurs.
Event payload
{ source: string; type: string; error: Error | string }Usage
import { events } from '@dropins/tools/event-bus.js';
const authErrorListener = events.on('auth/error', (data) => { console.log('auth/error event received:', data); // Add your custom logic here});
// Later, when you want to stop listeningauthErrorListener.off();auth/group-uid (emits)
Emitted when a specific condition or state change occurs.
Event payload
stringUsage
import { events } from '@dropins/tools/event-bus.js';
const authGroupUidListener = events.on('auth/group-uid', (data) => { console.log('auth/group-uid event received:', data); // Add your custom logic here});
// Later, when you want to stop listeningauthGroupUidListener.off();