> ## Documentation Index
> Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# June 10 2024

## Versions

* Latest SDK: [1.0.147](https://www.npmjs.com/package/@veltdev/react)
* Latest Types: [1.0.164](https://www.npmjs.com/package/@veltdev/types)

## Updated JWT Token to include user properties such as groupId and isAdmin

We updated the body that is sent to the `https://api.velt.dev/v1/auth/token/get` [JWT Token endpoint](/security/jwt-tokens) to include user properties such as `groupId` and `isAdmin`.

The `groupId` field is used to validate that the `groupId` provided in the `identify` call is the same as the one passed to the JWT Token.

The `isAdmin` field is used to set a user as an `admin`.

| Field                    | Required | Description                                                                                                                          |
| ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `apiKey`                 | Yes      | Velt API Key                                                                                                                         |
| `authToken  `            | Yes      | Auth Token from the Velt console                                                                                                     |
| `userId `                | Yes      | Unique user id of the user                                                                                                           |
| `userProperties.groupId` | No       | If `groupId` is provided, it will be validated with the groupId used in the identify call. Recommended if you are setting `groupIds` |
| `userProperties.isAdmin` | No       | Set to `true` if you want to set user as `admin`. This is the only way to set a user as an `admin` User                              |

```jsx theme={null}
{
  "data": {
    "apiKey": "YOUR_API_KEY", //Velt API Key
    "authToken": "YOUR_AUTH_TOKEN", // Auth Token from the Velt console
    "userId": "yourUserId", // unique user id of the user you are generating a JWT Token for
    "userProperties": {
        groupId: "YOUR_USER_GROUP_ID", // If groupId is provided here then we will validate it with the groupId used in the identify call
        isAdmin: true, // Set to true if you want to set user as admin
    }
  }
}
```

## Option to force re-login user on identify call

By default when you [identify](/get-started/advanced) a user, we maintain the user auth in the browser unless you explicitly change the logged in user with another identify call.

If you are granting a user additional access or have changed some metadata about the user and want those changes to be reflected immediately, then you should re-call the identify method with `forceReset` set to `true`.

```jsx theme={null}
await client.identify(user, {
  forceReset: true
});
```
