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