description |
---|
Logs out the currently authenticated Magic user |
Methods |
---|
logout( response: (_ resp: Response<Bool>) |
logout() -> Promise <Bool> |
Promise<Bool>
import MagicSDK
class MagicViewController: UIViewController {
let magic = Magic.shared
func logout() {
guard let magic = magic else { return }
// Assuming user is logged in
magic.user.logout(response: { response in
guard let result = response.result
else { return print("Error:", response.error.debugDescription) }
print("Result", result)
})
}
}