zooly profile.env.local file with AWS credentials:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGIONAWS resources (Cognito User Pool, App Client, and DynamoDB table) are created using the setup script.
set -a && source .env.local && ./scripts/setup-aws-auth.sh
The script:
zooly for all CLI commands.env.localAfter running the setup script, add these to your .env.local:
# Cognito
COGNITO_USER_POOL_ID=us-east-1_tvlpQoJAn
COGNITO_CLIENT_ID=2i28c7h1cpm6od29o7vatlncv9
COGNITO_REGION=us-east-1
# DynamoDB
DYNAMODB_IDENTITIES_TABLE=zooly-auth-identities
DYNAMODB_REGION=us-east-1
us-east-1_tvlpQoJAnzooly-auth-poolus-east-12i28c7h1cpm6od29o7vatlncv9zooly-auth-clientALLOW_USER_PASSWORD_AUTHALLOW_REFRESH_TOKEN_AUTHauth.zooly.aiauth.zooly.ai and use returnToTrade-off accepted:
api.zooly.ai vs api.dev.zooly.ai) and data/infrastructure, not authCurrently Configured:
Planned (Phase 2):
zooly-auth-identitiesuser_id (string)
sub for linked usersus-east-1Primary Key:
user_id (string) - Primary keyAttributes:
guest_email (string) - Email for guest checkout users before linkingdisplay_name (string) - User's display nameavatar_url (string) - User's avatar URLroles (string[]) - Array of role stringscognito_sub (string, nullable) - Cognito user ID for linked userscreated_at (number) - Unix timestampupdated_at (number) - Unix timestampguest_email is stored for guest checkout users before linkingfindIdentityByEmail. Consider adding GSI on guest_email for better performance at scale./api/me request (by user_id)findIdentityByEmail (consider GSI optimization)After setup, verify the resources:
aws cognito-idp describe-user-pool \
--user-pool-id us-east-1_tvlpQoJAn \
--profile zooly
aws cognito-idp describe-user-pool-client \
--user-pool-id us-east-1_tvlpQoJAn \
--client-id 2i28c7h1cpm6od29o7vatlncv9 \
--profile zooly
aws dynamodb describe-table \
--table-name zooly-auth-identities \
--profile zooly
After setup is complete:
On This Page
PrerequisitesAWS Resources SetupRunning the Setup ScriptEnvironment VariablesCognito User Pool ConfigurationCurrent SetupConfiguration DetailsApp Client ConfigurationImportant NotesIdentity ProvidersDynamoDB Table ConfigurationTable DetailsTable SchemaImportant NotesAccess PatternsVerificationCheck Cognito User PoolCheck Cognito App ClientCheck DynamoDB TableNext Steps