Overview⚓︎
When the Mobile SDK interacts with the different backend components, this results in status updates which can be of interest to other backend system. For instance, after presenting a login or enrol barcode, external systems might want to be notified when the user has authenticated or confirmed account creation. Similarly, they might want to receive updates about second factor attempts and react to instances being blocked. While the nextAuth Server already publishes basic events through its WebSocket transport, the functionality generalises this functionality.
We've chosen to adopt the CloudEvent specification, leveraging its event data descriptions and protocol bindings to support deployments.
Configuration⚓︎
In order to enable the events subsystem, the NEXTAUTH_NS_EVENTS_INSTANCE_QUEUE_URI and NEXTAUTH_SFS_EVENTS_INSTANCE_QUEUE_URI should be configured for the nextAuth Server and Second Factor Server respectively. Note that the nextAuth Server will subscribe to the Second Factor Server's queue where instance updates are published (see NEXTAUTH_NS_EVENTS_SFS_INSTANCE_QUEUE_NAME).