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/
Set AWS Config in .env
###
## AWS
VITE_APP_AWS_POOL_ID=
VITE_APP_AWS_APP_CLIENT_ID=
###Change AuthProvider
import { AWSCognitoProvider as AuthProvider } from 'contexts/AWSCognitoContext';Change auth Hooks
Comment another context in the following file and uncomment AWSCognito one.
import AuthContext from 'contexts/AWSCognitoContext';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\AWSCognitoLoginTo:
src\views\pages\authentication\auth-forms\AuthLogin.jsx
NEXTJS:
From:
src\components\Authentication\login\AWSCongnitoLoginTo:
src\components\Authentication\auth-forms\AuthLogin.jsx
Replace Register Code
VITE:
From:
src\views\pages\authentication\register\AWSCognitoRegisterTo:
src\views\pages\authentication\auth-forms\AuthRegister.jsx
NEXTJS:
From:
src\components\Authentication\register\AWSCognitoRegisterTo:
src\components\Authentication\auth-forms\AuthRegister.jsx
Last updated
Was this helpful?