> For the complete documentation index, see [llms.txt](https://docs.artificient.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.artificient.de/usage/react-native/authentication-and-user-management.md).

# Authentication and User Management

Every user on your platform must have a corresponding user ID on the GIZO platform. This association is established using the createUser method provided by the GIZO SDK.

## &#x20;Procedure of Authentication of a User

1. Use your client ID and client secret to authenticate and manage your company's users with the GIZO SDK.

```jsx
GizoSdk.setToken(<clientId>, <clientSecret>);
```

Go to step 4 if the user has already a user ID on the GIZO platform. Otherwise,

2. Use the createUser method to generate a new user ID:

```jsx
const userId = await GizoSdk.createUser();
if (userId != null) {
    console.log(userId);
}
```

3. Store the generated ID in your database, so you can use the next time.
4. Use the GIZO user ID associated to your user to authenticate your user. This can be done through the setUserId method:

```jsx
const status = await GizoSdk.setUserId(<gizoUserId>);
console.log(status);
```

<mark style="color:red;">NOTE: It is recommended to store the GIZO User IDs in you database to correlate your app user IDs to their respective GIZO user IDs</mark>
