MoveAuthState

MOVE Models

Returns the current MOVE SDK Authentication State.

enum class MoveAuthState {
    UNKNOWN,
    VALID,
    INVALID,
    @Deprecated("Do not use this state in your code")
    EXPIRED(MoveAuth)
}

If the MoveAuthState is invalid the MOVE backend no longer accepts MOVE SDK requests from this host app.

Authentication updates and invalidation

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.

In case the MOVE SDK fails to refresh authentication, because of a conflicting login on another device, or because the user was blocked on the backend, it will trigger MoveAuthState.invalid. The host app is expected to logout the user and callshutdown(force: true)(Android / iOS).

Authentication Updates

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

  • .invalid: The MOVE SDK has invalidated its internal user token at once. e.g. User has logged in on multiple devices. If necessary the host app has to register the user again (see register - MOVE Admin API).

Last updated