-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Loïk Fekkaï edited this page Feb 4, 2023
·
3 revisions
- Create a Cognito User Pool
- Add an app client, making sure to enable
ALLOW_USER_PASSWORD_AUTH
auth flow. Store this client ID in the environment variableCOGNITO_CLIENT_ID
. - Create groups in the pool:
dolphin
,manta
, andshark
. - Create a user (ex.
[email protected]
). Store the credentials inCOGNITO_USER_EMAIL
andCOGNITO_USER_PASSWORD
. - Create a user (ex.
[email protected]
) and add to groupdolphin
. Store the credentials inFLIPPER_EMAIL
andFLIPPER_PASSWORD
. - Create a user (ex.
[email protected]
) and add to groupmanta
. Store the credentials inRAY_EMAIL
andRAY_PASSWORD
. - Create a user (ex.
[email protected]
) and add to groupshark
. Store the credentials inBLUE_EMAIL
andBLUE_PASSWORD
.
Set COGNITO_REGION
with the AWS region in which you created your user pool.
![step-1_config-sign-in](https://user-images.githubusercontent.com/9872839/178252351-49a4aba7-4c72-432a-b438-4769e6824972.png)
![step-2_config-security-requirements](https://user-images.githubusercontent.com/9872839/178252312-49d23ffe-31a5-4e32-bf33-4ee34ae5318d.png)
![step-3_config-sign-up](https://user-images.githubusercontent.com/9872839/178252278-5ba39d59-9abc-4f0a-8565-764377dde5b7.png)
![step-4_config-message-delivery](https://user-images.githubusercontent.com/9872839/178252249-39f1a9e3-f918-4631-ac1a-45f5ee7906ee.png)
That's done ! Now let's go to create users and group used by e2e tests !
![create-user](https://user-images.githubusercontent.com/9872839/178252142-7dd1bdbc-0853-4eba-8d90-0000d8687482.png)
![create-admin-user](https://user-images.githubusercontent.com/9872839/178252107-b100701c-6142-4f40-bd95-74ef04c66960.png)
![create-admin-group](https://user-images.githubusercontent.com/9872839/178252081-e8838b92-5e14-4944-9652-78602a468258.png)
![admin-user-final](https://user-images.githubusercontent.com/9872839/178252056-02adc00e-5b2f-463d-8b79-4a7482194503.png)
Perfect ! There is one last step missing to be able to run the test !
COGNITO_CLIENT_ID=YOUR_COGNITO_APPLICATION_CLIENT
COGNITO_REGION=COGNITO_REGION
COGNITO_USER_POOL_ID=USER_POOL_ID
[email protected]
FLIPPER_PASSWORD=password
[email protected]
BLUE_PASSWORD=password
[email protected]
MOBY_PASSWORD=password
[email protected]
RAY_PASSWORD=password
[email protected]
[email protected]
COGNITO_USER_PASSWORD=password
COGNITO_USER_PASSWORD_ADMIN=password
npm run test