# MoveAuth

The [MoveAuth ](/move-platform/move-sdk-1.x/sdk/models/moveauth.md)object is used to validate the usage of the SDK and configure its services according to that product's specifications.

{% tabs %}
{% tab title="Android" %}

```kotlin
MoveAuth {
    productID: Long
    contractId: String
    accessToken: String
    refreshToken: String    
}
```

{% endtab %}

{% tab title="iOS" %}

```swift
struct MoveAuth {
    var userToken: String
    var refreshToken: String
    var contractID: String
    var productID: Int
}
```

{% endtab %}

{% tab title="React Native" %}

```javascript
export type RnDolphinAuth = {
  productId: number,
  contractId: string,
  accessToken: string,
  refreshToken: string,
};
```

{% endtab %}
{% endtabs %}

| MoveAuth     |        |                                     |
| ------------ | ------ | ----------------------------------- |
| userToken    | String | User's session-based access token.  |
| refreshToken | String | User's session-based refresh token. |
| contractID   | String | User's contract id.                 |
| productID    | String | Client's product id.                |

{% hint style="warning" %}

### Authentication Expiry

The host app is expected to monitor [MoveAuthState](/move-platform/move-sdk-1.x/sdk/models/moveauthstate.md) updates via`authStateChangeListener`(Android / [iOS](/move-platform/move-sdk-1.x/sdk/api-interface/ios/services.md#set-sdk-auth-state-listener)) API and handle those changes accordingly.

Check [Authentication updates and expiry](/move-platform/move-sdk-1.x/sdk/models/moveauthstate.md#authentication-updates-and-expiry) for more details.&#x20;
{% endhint %}

| MoveAuth related APIs                                                                                                                       |                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `setAuthStateChangeListener()` (Android / [iOS](/move-platform/move-sdk-1.x/sdk/api-interface/ios/services.md#set-sdk-auth-state-listener)) | Block to be invoked every time SDK [MoveAuthState](/move-platform/move-sdk-1.x/sdk/models/moveauthstate.md) changes. |
| `getAuthState()`(Android / [iOS](/move-platform/move-sdk-1.x/sdk/api-interface/ios/services.md#get-sdk-auth-state))                         | Gets the current [MoveAuthState](/move-platform/move-sdk-1.x/sdk/models/moveauthstate.md).                           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.movesdk.com/move-platform/move-sdk-1.x/sdk/models/moveauth.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
