# MoveAuth

The [MoveAuth ](https://docs.movesdk.com/move-platform/sdk/models/moveauth)object is used to validate the usage of the MOVE SDK and configure its services according to project specifications.

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

<pre class="language-kotlin"><code class="lang-kotlin"><strong>data class MoveAuth(
</strong>    var projectId: Long,
    var userId: String,
    var accessToken: String,
    var refreshToken: String
)
</code></pre>

{% endtab %}

{% tab title="iOS" %}

```swift
struct MoveAuth {
    var userToken: String
    var refreshToken: String
    var userID: String
    var projectID: Int
}
```

{% endtab %}

{% tab title="React Native" %}

```javascript
export type MoveSdkAuth = {
  userId: string;
  accessToken: string;
  refreshToken: string;
  projectId: number;
};
```

{% endtab %}

{% tab title="Flutter" %}

```dart
import 'package:movesdk/io/dolphin/move/move_auth.dart';
```

```dart
class MoveAuth {
  String projectId;
  String userId;
  String accessToken;
  String refreshToken;
}
```

{% endtab %}
{% endtabs %}

| **MoveAuth** | **Type** |                                                                                                                                                              |
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| accessToken  | String   | User's session-based access token.                                                                                                                           |
| refreshToken | String   | User's session-based refresh token.                                                                                                                          |
| userID       | String   | Unique identifier of the user.                                                                                                                               |
| projectID    | String   | Unique identifier of the MOVE project. Can be obtained from the [MOVE Dashboard](https://docs.movesdk.com/move-platform/sdk/getting-started/move-dashboard). |

{% hint style="warning" %}

### Authentication Expiry

The host app is expected to monitor [MoveAuthState](https://docs.movesdk.com/move-platform/sdk/models/moveauthstate) updates via`authStateUpdateListener`API and handle those changes accordingly.

Check [Authentication updates and expiry](https://docs.movesdk.com/move-platform/sdk/moveauthstate#authentication-updates-and-expiry) for more details.&#x20;
{% endhint %}

| **MoveAuth related**        |                                                                                                                                   |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `authStateUpdateListener()` | Block to be invoked every time MOVE SDK [MoveAuthState](https://docs.movesdk.com/move-platform/sdk/models/moveauthstate) changes. |
| `getAuthState()`            | Gets the current [MoveAuthState](https://docs.movesdk.com/move-platform/sdk/models/moveauthstate).                                |


---

# 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/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.
