Skip to main content

Sync accounts (iOS)

The SecureAuth server stores enrolled accounts and device push tokens to use for push services. When an account is updated or deleted or the device push token is changed, the following functions make a call that updates the appropriate data on the server.

You can optionally add the following code in the appDelegate class so that the syncAccounts call runs when you start your application. This keeps accounts on your local device synced with the account information on the Identity Platform.

The following method returns an Observable Bool value that indicates if the method synced successfully.

  • SecureAuthService.syncAccounts()

    This method syncs existing accounts.

The following methods return an Observable Int value that corresponds to the HTTPURLResponse statusCode.

  • SecureAuthService.refreshAccount(_account:)

    This method updates an account or push token.

  • SecureAuthService.deleteAccount(_account:)

    This method deletes an account.