Logout
If you want to perform a logout, you can call the logout
function in the AuthenticationProvider. This will emit the state AuthenticationState.Initial if the logout is successful, and if an error occurs, it will emit AuthenticationState.Error.
kotlin
authenticationProvider.logout(context)
NOTE
The logout
function is a suspend function. Therefore, you need to call it inside a coroutine.