> For the complete documentation index, see [llms.txt](https://codedthemes.gitbook.io/berry/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codedthemes.gitbook.io/berry/v3.9.0/authentication/aws-cognito.md).

# AWS Cognito

At present, AWS uses a dummy config, so we don't need to change anything, but in actual implementation, you need to set poolId and appClientId in the following file. For more detail refer to AWS here: <https://aws.amazon.com/cognito/>

1. **Set AWS Config in .env**

{% code title="." %}

```javascript
###
## AWS

VITE_APP_AWS_POOL_ID=
VITE_APP_AWS_APP_CLIENT_ID=
###
```

{% endcode %}

2. **Change AuthProvider**

{% code title="..\src\App.jsx" %}

```javascript
import { AWSCognitoProvider as AuthProvider } from 'contexts/AWSCognitoContext';
```

{% endcode %}

3. **Change auth Hooks**

Comment another context in the following file and uncomment AWSCognito one.

{% code title="..\src\hooks\useAuth.js" %}

```javascript
import AuthContext from 'contexts/AWSCognitoContext';
```

{% endcode %}

4. **Replace Login Code**

It's super simple. We have provided a code that just needs to be replaced.

* **VITE**:
  * From: `src\views\pages\authentication\login\AWSCognitoLogin`&#x20;
  * To: `src\views\pages\authentication\auth-forms\AuthLogin.jsx`
* **NEXTJS**:
  * From: `src\components\Authentication\login\AWSCongnitoLogin`
  * To: `src\components\Authentication\auth-forms\AuthLogin.jsx`

5. **Replace Register Code**

* **VITE**:
  * From: `src\views\pages\authentication\register\AWSCognitoRegister`&#x20;
  * To: `src\views\pages\authentication\auth-forms\AuthRegister.jsx`
* **NEXTJS**:
  * From: `src\components\Authentication\register\AWSCognitoRegister`
  * To: `src\components\Authentication\auth-forms\AuthRegister.jsx`
