Auth
The Auth namespace provides events for handling authentication state within the Aura Widget.
Events
Events broadcast by the widget that you can subscribe to.
Auth.Complete
Fired when authentication has been successfully completed. This event is triggered both after the initial init() call and after any subsequent setUser() calls.
AuraWidget.on('Auth.Complete', (data) => {
console.log('Authentication complete:', data);
});Payload
The payload contains the same response as documented in the Authentication Success section. See the Response Payload for the complete list of properties.
This event is useful for confirming that a user switch via setUser() has
completed successfully. For handling authentication after init(), we
recommend using either the promise-based approach or the
onAuthenticated callback as documented in Authentication
Success.
Errors
The error events emitted during the course of authentication. Each error event receives the common error properties as payload, in addition to the event-specific properties listed below.
Auth.Error
Fired when an error occurs during authentication. The event receives the common error properties as payload.
AuraWidget.on('Auth.Error', (error) => {
console.error('Authentication error:', error);
});