Logout
Feature in development
Introduction
The Logout service is responsible for logging an user out of their account.
Use the following code to obtain an instance of LogoutService
:
- Kotlin
- Swift
val logoutService = Wallet.getInstance().getLogoutService()
import PaysafeWallet
let logoutService = Wallet.instance.logoutService
Key Features:
- Logging an user out of their account.
Logout
Use logout
method defined in the logoutService
to start the logout process by passing a LogoutOperationType
specifying the scope of the logout.
note
Keep in mind that the logout request might fail. In that case the logout in the SDK will not happen and the error needs to be handled. Logout will be considered successful only after the success of the logout request.
- Kotlin
- Swift
logoutService.logout(type: .device)
import PaysafeWallet
try await logoutService.logout(type: .device)