client.on(eventName: Event, callback: function)

About this command

Add a listener for a particular ReachFive event.


client.on('authenticated', authResult => {
  const accessToken = authResult.accessToken
  // ...


eventName Event

One of the following events:

  • authenticated: emitted after a successful authentication.

  • authentication_failed: emitted after a failed authentication with a social provider.

  • login_failed: emitted after a failed password or Webauthn login.

  • signup_failed: emitted after a failed signup.

  • profile_updated: emitted after a successful profile update.

  • ready: emitted when the SDK is fully loaded. If the SDK is already loaded, the handler is called synchronously.

callback function

The function called when the event occurs.


Type: void