refresh
Refreshes the credentials for the current app user.
Manually triggers a sync with the server to fetch latest credentials. This operation requires an active internet connection. You should call initialize and activate first.
The credentials StateFlow will be updated before this method returns. In most cases, automatic background sync makes manual refresh unnecessary.
val seamSDK = SeamSDK.getInstance()
try {
seamSDK.refresh()
} catch (seamError: SeamError) {
when (seamError) {
is SeamError.InitializationRequired -> {
// handle error when SDK is not initialized
}
is SeamError.DeactivationInProgress -> {
// handle error when app is being deactivated
}
else -> {
// handle other errors
}
}
}Content copied to clipboard
Return
The updated list of credentials after refresh completes.
Throws
if the SDK has not been initialized yet.
if a deactivation is in progress.