Log out users

You can log out users programmatically when needed. For example, you can log out users in the following situations:
  • When a user is inactive after the idle time limit
  • When you use a custom login instead of the default login

Log out users

This example shows how to log out a user account when an idle timer is triggered, if that is something your app requires or supports.
Objective-C
1
/// This function is triggered when the idle timer expires and the user should be logged out
2
- (void)idleTimerTriggered {
3
[[iZettleSDK shared] logout];
4
}
Swift
1
/// This function is triggered when the idle timer expires and the user should be logged out
2
func idleTimerTriggered() {
3
iZettleSDK.shared().logout()
4
}