This project aims to provide a clear overview on how to use the Amplify Auth module in a React-Gatsby project
- Register
- Login
- Logout
- Profile shows user information from Amplify/Coginito user pools
- Clone the repository
npm install
- Set up a Cognito User Pool with an appropriate web client - This projet User Pool Settings:
- users can use their email address as the username
- verification type is "Link"
- app client is no secret key
- and added a custom domain (it is required if the verification is set to "Link")
- create a
.env.development
file in the root directory with the following keys and values
key | description |
---|---|
COGNITO_REGION | AWS region of the cognito user pool |
COGNITO_USER_POOL_ID | AWS Cognito user pool ID |
COGNITO_USER_POOL_WEB_CLIENT_ID | AWS Cognito user pool web client ID |