logout
Signs the user out and clears local session state.
Return
true if the logout flow completed; false only if a required step fails.
Throws
if an unexpected error occurs during the process.
Android (Kotlin) — settings > sign out
lifecycleScope.launch {
try {
val ok = AFCore.authentication().logout()
if (ok) navigateToSignIn()
} catch (t: Throwable) {
showError("Logout failed: ${t.message}")
}
}Content copied to clipboard
iOS (Swift) — settings > sign out
Task {
do {
let ok = try await AFCore.shared.authentication().logout()
if ok { navigateToSignIn() }
} catch {
showError("Logout failed: \\(error.localizedDescription)")
}
}Content copied to clipboard