Skip to content

Commit

Permalink
feat: update cognito realworld app to allow for cy.origin() (#1292)
Browse files Browse the repository at this point in the history
* feat: update cognito realworld app to allow for cy.origin() with federated cognito

* chore: remove unecessary amplify files
  • Loading branch information
AtofStryker authored Dec 5, 2022
1 parent a221bdb commit 70fb782
Show file tree
Hide file tree
Showing 15 changed files with 252 additions and 468 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ REACT_APP_BACKEND_PORT=3001
# Additional config taken from aws-exports.js
#AWS_COGNITO_USERNAME="[email protected]"
#AWS_COGNITO_PASSWORD="s3cret1234$"
#AWS_COGNITO_DOMAIN="https://YOUR_COGNITO_INSTANCE.auth.us-east-1.amazoncognito.com"
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@

data
build
coverage
coverage
amplify/*
aws-exports*
30 changes: 15 additions & 15 deletions amplify/.config/project-config.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"projectName": "cypressrealworldapp",
"version": "3.0",
"frontend": "javascript",
"javascript": {
"framework": "react",
"config": {
"SourceDir": "src",
"DistributionDir": "build",
"BuildCommand": "npm run-script build",
"StartCommand": "yarn dev:cognito"
}
},
"providers": [
"awscloudformation"
]
"projectName": "cypressrealworldapp",
"version": "3.1",
"frontend": "javascript",
"javascript": {
"framework": "react",
"config": {
"SourceDir": "src",
"DistributionDir": "build",
"BuildCommand": "npm run-script build",
"StartCommand": "yarn dev:cognito"
}
},
"providers": [
"awscloudformation"
]
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"version": "1",
"cognitoConfig": {
"identityPoolName": "cypressrealworldapp3a466349_identitypool_3a466349",
"allowUnauthenticatedIdentities": false,
"resourceNameTruncated": "cypres3a466349",
"userPoolName": "cypressrealworldapp3a466349_userpool_3a466349",
"autoVerifiedAttributes": [
"email"
"email"
],
"mfaConfiguration": "OFF",
"mfaTypes": [
"SMS Text Message"
"SMS Text Message"
],
"smsAuthenticationMessage": "Your authentication code is {####}",
"smsVerificationMessage": "Your verification code is {####}",
Expand All @@ -18,37 +20,48 @@
"passwordPolicyMinLength": 8,
"passwordPolicyCharacters": [],
"requiredAttributes": [
"email"
"email"
],
"aliasAttributes": [],
"userpoolClientGenerateSecret": true,
"userpoolClientRefreshTokenValidity": 30,
"userpoolClientWriteAttributes": [
"email"
"email"
],
"userpoolClientReadAttributes": [
"email"
"email"
],
"userpoolClientLambdaRole": "cypres3a466349_userpoolclient_lambda_role",
"userpoolClientSetAttributes": false,
"sharedId": "3a466349",
"resourceName": "cypressrealworldapp3a466349",
"authSelections": "identityPoolAndUserPool",
"resourceName": "cypressrealworldapp3a466349",
"useDefault": "defaultSocial",
"sharedId": "3a466349",
"userPoolGroupList": [],
"usernameAttributes": [
"email"
],
"authRoleArn": {
"Fn::GetAtt": [
"AuthRole",
"Arn"
]
"Fn::GetAtt": [
"AuthRole",
"Arn"
]
},
"unauthRoleArn": {
"Fn::GetAtt": [
"UnauthRole",
"Arn"
]
"Fn::GetAtt": [
"UnauthRole",
"Arn"
]
},
"useDefault": "default",
"usernameAttributes": [
"email"
],
"userPoolGroupList": [],
"dependsOn": []
}
"breakCircularDependency": false,
"useEnabledMfas": false,
"dependsOn": [],
"hostedUI": true,
"hostedUIDomainName": "cypressrealworldapp637ae3a1-637ae3a1",
"authProvidersUserPool": [],
"hostedUIProviderMeta": "[]",
"oAuthMetadata": "{\"AllowedOAuthFlows\":[\"code\"],\"AllowedOAuthScopes\":[\"phone\",\"email\",\"openid\",\"profile\",\"aws.cognito.signin.user.admin\"],\"CallbackURLs\":[\"http://localhost:3000/\"],\"LogoutURLs\":[\"http://localhost:3000/\"]}",
"serviceName": "Cognito",
"authProviders": []
}
}
Loading

0 comments on commit 70fb782

Please sign in to comment.