Handles the disconnection logic by either redirecting to a specified URL or showing an alert.
The options for handling disconnection.
OptionalshowAlert?: ShowAlertOptionalredirectURL?: stringOptionalupdateValidated?: (isValidated: boolean) => voidA promise that resolves when the disconnection handling is complete.
Service to handle disconnection logic, providing options to redirect or display an alert message.
Name
Disconnect
Description
This service manages user disconnection by either redirecting the user to a specified URL (for web platforms) or showing a custom alert message.
Method
disconnect
Async
Param: options
The options for handling disconnection.
Param: options.showAlert
Function to display an alert message if a redirect is not needed.
Param: options.redirectURL
The URL to redirect to upon disconnection, if applicable.
Param: options.onWeb
Flag indicating if the application is running on the web.
Param: options.updateValidated
Optional function to update validation state, primarily for native applications.
Returns
A promise that resolves when the disconnection process completes.
Example