MoveAuthState

MOVE Models

Returns the current MOVE SDK Authentication State.

enum class MoveAuthState {
    UNKNOWN,
    VALID,
    EXPIRED(MoveAuth)
}

MoveAuthState

valid

Authentication is valid.

unknown

The SDK authorization state when MOVE SDK is uninitialized.

Authentication updates and expiry

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 authStateUpdateListener 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 project API Key and then call update(auth: MoveAuth)(Android / iOS) API.

Authentication Updates

The host app is responsible for monitoring MoveAuthState updates and handling its state updates by:

  • .expired: Requesting new Auth using the project API Key and then passing it to the SDK using update(auth: MoveAuth) API.

  • .valid: The SDK has accepted a new app auth via update(auth: MoveAuth) or updated its internal user token.

MoveAuthState related APIs

authStateUpdateListener

Last updated

#70: add MoveSdkAndroidConfig model

Change request updated