Dolphin MOVE SDK
SDK
1.x
1.x
  • Introduction
  • MOVE Services
  • MOVE SDK
    • Getting Started
      • MOVE Dashboard
      • Android
        • Installation
        • Quick Start
      • iOS
        • Installation
        • Quick Start
      • React Native
    • API Interface
      • Android
        • Initialization
        • Services
      • iOS
        • Initialization
        • Services
      • React Native
        • Initialization
        • Services
    • Models
      • MoveAuth
      • MoveConfig
      • MoveConfigurationError
      • MoveDeviceStatus
      • MoveSDKState
      • MoveTripState
      • MoveAuthState
      • Listeners/Callbacks
    • Appendix
      • Android
        • Token refresh
        • Permission Handling
        • Battery optimization
        • Notification Management
      • iOS
        • Permissions Handling
        • App Store
  • MOVE Backend
    • MOVE Timeline
    • MOVE State
    • MOVE Last Location
    • MOVE Generic Notifier
    • Open Api Specification
  • Changelog
    • Android
    • iOS
  • Data privacy (GDPR)
Powered by GitBook
On this page
  1. MOVE SDK
  2. Models

MoveAuthState

PreviousMoveTripStateNextListeners/Callbacks

Last updated 3 years ago

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';

MoveAuthState

unknown

The SDK authorization state when SDK is uninitialized.

Authentication updates and expiry

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 / ) API callback.

In case the SDK fails to refresh authentication, it will trigger .expired. The host app is expected to fetch a new token with the product's API Key and then call update(auth: MoveAuth)( / ) API.

Authentication Updates

The host app is responsible for monitoring 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 API.

  • .valid(MoveAuth): Persisting the new provided by the SDK, so the app can pass this new next time it is initializing the SDK.

MoveAuthState related APIs

expired()

Latest expired and the SDK can't refresh it.

valid()

Authentication is valid. Latest provided.

getSDKAuthState (Android / )

Gets the current .

setSDKAuthUpdatesListener (Android / )

Block to be invoked every time changes.

MoveAuth
MoveAuth
MoveAuth
MoveAuth
MoveAuthState
MoveAuthState
MoveAuth
MoveAuthState
MoveAuthState
MoveAuth
MoveAuth
iOS
iOS
iOS
iOS
update(auth: MoveAuth)
Android