MoveAuthState
Last updated
Returns the current SDK Authentication State.
enum class MoveAuthState {
UNKNOWN,
VALID(MoveAuth)
EXPIRED(MoveAuth)
}enum MoveAuthState {
case unknown
case expired
case valid(MoveAuth)
}export type AuthState = 'unknown' | 'valid' | 'expired';MoveAuth is session-based, hence it expires and requires to be renewed. For simplicity, the MOVE SDK handles refreshing the token for the host app whenever it expires and passes the new MoveAuth when updated via authStateChangeListener (Android / iOS) API callback.
In case the SDK fails to refresh authentication, it will trigger MoveAuthState.expired. The host app is expected to fetch a new token with the product's API Key and then call update(auth: MoveAuth)(Android / iOS) API.
The host app is responsible for monitoring MoveAuthState updates and handling its state updates by:
.expired: Requesting new Auth using the product's API Key and then passing it to the SDK using update(auth: MoveAuth) API.
MoveAuthState related APIs
getSDKAuthState (Android / iOS)
Gets the current MoveAuthState.
setSDKAuthUpdatesListener (Android / iOS)
Block to be invoked every time MoveAuthState changes.
Last updated