Dolphin MOVE SDK
2.x
2.x
  • Introduction
  • MOVE Services
  • MOVE SDK
    • Getting Started
      • MOVE Dashboard
        • Access Control
        • Configuration
        • Timeline
        • Points of Interest
      • Android
        • Installation
        • Quick Start
      • iOS
        • Installation
        • Quick Start
        • Troubleshooting
      • React Native
      • Flutter
      • Move SDK CLI
    • API Interface
      • Android
        • Initialization
        • Services
      • iOS
        • Initialization
        • Setup
        • Services
      • React Native
        • Components
        • Initialization
        • Services
      • Flutter
        • Initialization
        • Services
    • Models
      • Listeners/Callbacks
      • MoveAssistanceCallStatus
      • MoveAuth
      • MoveAuthError
      • MoveAuthResult
      • MoveAuthState
      • MoveConfig
      • MoveConfigurationError
      • MoveDevice
      • MoveDeviceStatus
      • MoveGeocodeError
      • MoveHealthItem
      • MoveHealthScore
      • MoveOptions
        • DeviceDiscovery
      • MoveSdkState
      • MoveSdkAndroidConfig
      • MoveTripState
      • MoveScanResult
      • MoveServiceFailure
      • MoveServiceWarning
      • MoveShutdownResult
    • Appendix
      • Token refresh
      • Android
        • Permission Handling
          • Permission Overview
          • Runtime Permissions
        • Battery optimization
        • Notification Management
      • iOS
        • Permissions Handling
        • App Store
      • React Native
        • Permission Handling
  • MOVE Backend
    • MOVE Backend
      • MOVE Admin API
      • MOVE TIMELINE API
      • MOVE State API
      • MOVE Last Location API
    • MOVE Generic Notifier
    • MOVE Assistance Notifier
    • Example requests
  • FAQ
  • Changelog
    • Android
    • iOS
    • React
    • Flutter
    • Backend
  • Data privacy (GDPR)
Powered by GitBook
On this page
  1. MOVE SDK
  2. Models

MoveAuthState

MOVE Models

PreviousMoveAuthResultNextMoveConfig

Last updated 11 months ago

Returns the current MOVE SDK Authentication State.

enum class MoveAuthState {
    UNKNOWN,
    VALID,
    INVALID,
    @Deprecated("Do not use this state in your code")
    EXPIRED(MoveAuth)
}
enum MoveAuthState {
    case unknown
    
    @available(*, deprecated, message: "Token expiry was removed.")
    case expired
    
    case valid
    
    case invalid
}
export type AuthState = 'UNKNOWN' | 'VALID' | 'INVALID' | 'EXPIRED';
import 'package:movesdk/io/dolphin/move/move_auth_state.dart';
enum MoveAuthState {
  unknown,
  
  @Deprecated('obsolete')
  expired,
  
  invalid,
  
  valid,
}

MoveAuthState

valid

Authentication is valid.

invalid

Authentication is invalid. e.g. User has logged in on multiple devices. New since SDK v2.4

unknown

MOVE SDK auth state is pending, and will be updated when the server is contacted. The app should ignore this state.

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

Authentication updates and invalidation

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)( / ).

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 ).

MoveAuthState related APIs

expired()

Latest expired and the MOVE SDK can't refresh it. Deprecated in SDK v2.6.7.

authStateUpdateListener ( / / / )

Block to be invoked every time changes.

MoveAuth
MoveAuth
MoveAuthState
MoveAuth
iOS
iOS
Flutter
register - MOVE Admin API
React
Android
Android