Service to handle disconnection logic, providing options to redirect or display an alert message.

Disconnect

This service manages user disconnection by either redirecting the user to a specified URL (for web platforms) or showing a custom alert message.

disconnect

The options for handling disconnection.

Function to display an alert message if a redirect is not needed.

The URL to redirect to upon disconnection, if applicable.

Flag indicating if the application is running on the web.

Optional function to update validation state, primarily for native applications.

A promise that resolves when the disconnection process completes.

const disconnectOptions = {
showAlert: (alert) => console.log(alert.message),
redirectURL: 'https://example.com/home',
onWeb: true,
updateValidated: (isValid) => console.log(`Validation updated: ${isValid}`)
};
disconnectService.disconnect(disconnectOptions);

Constructors

Methods

Constructors

Methods