Skip to content

Commit 5e69e8d

Browse files
author
Alex Patterson
committed
working auth
1 parent c1c0c03 commit 5e69e8d

35 files changed

Lines changed: 1340 additions & 8891 deletions

backend/amplify/backend/auth/codingcatdev6e3ad98f/codingcatdev6e3ad98f-cloudformation-template.yml renamed to backend/amplify/backend/auth/codingcatdevdae34f16/codingcatdevdae34f16-cloudformation-template.yml

Lines changed: 21 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -121,77 +121,41 @@ Parameters:
121121
usernameAttributes:
122122
Type: CommaDelimitedList
123123

124-
125-
userPoolGroupList:
126-
Type: CommaDelimitedList
127-
128-
serviceName:
129-
Type: String
130-
131-
132-
133-
usernameCaseSensitive:
134-
Type: String
135-
136-
137-
dependsOn:
138-
Type: CommaDelimitedList
139-
140-
hostedUIProviderCreds:
124+
hostedUIDomainName:
141125
Type: String
142126

143127

144-
145-
thirdPartyAuth:
146-
Type: String
147-
148128

149-
authProviders:
129+
authProvidersUserPool:
150130
Type: CommaDelimitedList
151131

152-
facebookAppId:
153-
Type: String
154-
155-
156-
googleClientId:
157-
Type: String
158-
159-
160-
161-
userPoolGroups:
132+
hostedUIProviderMeta:
162133
Type: String
163-
164134

165-
adminQueries:
166-
Type: String
167135

168-
triggers:
136+
hostedUIProviderCreds:
169137
Type: String
170138

171139

172-
hostedUIDomainName:
140+
oAuthMetadata:
173141
Type: String
174142

175143

176144

177-
authProvidersUserPool:
145+
userPoolGroupList:
178146
Type: CommaDelimitedList
179147

180-
hostedUIProviderMeta:
181-
Type: String
182-
183148

184-
oAuthMetadata:
149+
serviceName:
185150
Type: String
186151

187152

188-
189-
190-
parentStack:
153+
154+
usernameCaseSensitive:
191155
Type: String
156+
192157

193-
194-
permissions:
158+
dependsOn:
195159
Type: CommaDelimitedList
196160

197161
Conditions:
@@ -205,7 +169,7 @@ Resources:
205169
# Created to allow the UserPool SMS Config to publish via the Simple Notification Service during MFA Process
206170
Type: AWS::IAM::Role
207171
Properties:
208-
RoleName: !If [ShouldNotCreateEnvResources, 'coding6e3ad98f_sns-role', !Join ['',[ 'sns', '6e3ad98f', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]]
172+
RoleName: !If [ShouldNotCreateEnvResources, 'codingdae34f16_sns-role', !Join ['',[ 'sns', 'dae34f16', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]]
209173
AssumeRolePolicyDocument:
210174
Version: "2012-10-17"
211175
Statement:
@@ -217,10 +181,10 @@ Resources:
217181
- "sts:AssumeRole"
218182
Condition:
219183
StringEquals:
220-
sts:ExternalId: coding6e3ad98f_role_external_id
184+
sts:ExternalId: codingdae34f16_role_external_id
221185
Policies:
222186
-
223-
PolicyName: coding6e3ad98f-sns-policy
187+
PolicyName: codingdae34f16-sns-policy
224188
PolicyDocument:
225189
Version: "2012-10-17"
226190
Statement:
@@ -272,27 +236,15 @@ Resources:
272236
SmsVerificationMessage: !Ref smsVerificationMessage
273237
SmsConfiguration:
274238
SnsCallerArn: !GetAtt SNSRole.Arn
275-
ExternalId: coding6e3ad98f_role_external_id
239+
ExternalId: codingdae34f16_role_external_id
276240

277241

278-
279-
280-
281-
282-
283-
284-
285-
286-
287-
# Updating lambda role with permissions to Cognito
288-
289-
290242
UserPoolClientWeb:
291243
# Created provide application access to user pool
292244
# Depends on UserPool for ID reference
293245
Type: "AWS::Cognito::UserPoolClient"
294246
Properties:
295-
ClientName: coding6e3ad98f_app_clientWeb
247+
ClientName: codingdae34f16_app_clientWeb
296248

297249
RefreshTokenValidity: !Ref userpoolClientRefreshTokenValidity
298250
UserPoolId: !Ref UserPool
@@ -302,7 +254,7 @@ Resources:
302254
# Depends on UserPool for ID reference
303255
Type: "AWS::Cognito::UserPoolClient"
304256
Properties:
305-
ClientName: coding6e3ad98f_app_client
257+
ClientName: codingdae34f16_app_client
306258

307259
GenerateSecret: !Ref userpoolClientGenerateSecret
308260
RefreshTokenValidity: !Ref userpoolClientRefreshTokenValidity
@@ -313,7 +265,7 @@ Resources:
313265
# Created to execute Lambda which gets userpool app client config values
314266
Type: 'AWS::IAM::Role'
315267
Properties:
316-
RoleName: !If [ShouldNotCreateEnvResources, !Ref userpoolClientLambdaRole, !Join ['',['upClientLambdaRole', '6e3ad98f', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]]
268+
RoleName: !If [ShouldNotCreateEnvResources, !Ref userpoolClientLambdaRole, !Join ['',['upClientLambdaRole', 'dae34f16', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]]
317269
AssumeRolePolicyDocument:
318270
Version: '2012-10-17'
319271
Statement:
@@ -367,7 +319,7 @@ Resources:
367319
# Marked as depending on UserPoolClientRole for easier to understand CFN sequencing
368320
Type: 'AWS::IAM::Policy'
369321
Properties:
370-
PolicyName: coding6e3ad98f_userpoolclient_lambda_iam_policy
322+
PolicyName: codingdae34f16_userpoolclient_lambda_iam_policy
371323
Roles:
372324
- !Ref UserPoolClientRole
373325
PolicyDocument:
@@ -384,7 +336,7 @@ Resources:
384336
# Marked as depending on UserPoolClientLambdaPolicy for easier to understand CFN sequencing
385337
Type: 'AWS::IAM::Policy'
386338
Properties:
387-
PolicyName: coding6e3ad98f_userpoolclient_lambda_log_policy
339+
PolicyName: codingdae34f16_userpoolclient_lambda_log_policy
388340
Roles:
389341
- !Ref UserPoolClientRole
390342
PolicyDocument:
@@ -774,7 +726,7 @@ Resources:
774726
# Always created
775727
Type: AWS::Cognito::IdentityPool
776728
Properties:
777-
IdentityPoolName: !If [ShouldNotCreateEnvResources, 'codingcatdev6e3ad98f_identitypool_6e3ad98f', !Join ['',['codingcatdev6e3ad98f_identitypool_6e3ad98f', '__', !Ref env]]]
729+
IdentityPoolName: !If [ShouldNotCreateEnvResources, 'codingcatdevdae34f16_identitypool_dae34f16', !Join ['',['codingcatdevdae34f16_identitypool_dae34f16', '__', !Ref env]]]
778730

779731
CognitoIdentityProviders:
780732
- ClientId: !Ref UserPoolClient
@@ -786,15 +738,6 @@ Resources:
786738
- cognito-idp.${region}.amazonaws.com/${client}
787739
- { region: !Ref "AWS::Region", client: !Ref UserPool}
788740

789-
SupportedLoginProviders:
790-
791-
graph.facebook.com: !Ref facebookAppId
792-
793-
794-
accounts.google.com: !Ref googleClientId
795-
796-
797-
798741
AllowUnauthenticatedIdentities: !Ref allowUnauthenticatedIdentities
799742

800743

@@ -845,14 +788,8 @@ Outputs :
845788
Value: !GetAtt UserPoolClientInputs.appSecret
846789

847790

848-
GoogleWebClient:
849-
Value: !Ref googleClientId
850-
851-
852791

853792

854-
FacebookWebClient:
855-
Value: !Ref facebookAppId
856793

857794

858795

backend/amplify/backend/auth/codingcatdev6e3ad98f/parameters.json renamed to backend/amplify/backend/auth/codingcatdevdae34f16/parameters.json

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"identityPoolName": "codingcatdev6e3ad98f_identitypool_6e3ad98f",
2+
"identityPoolName": "codingcatdevdae34f16_identitypool_dae34f16",
33
"allowUnauthenticatedIdentities": false,
4-
"resourceNameTruncated": "coding6e3ad98f",
5-
"userPoolName": "codingcatdev6e3ad98f_userpool_6e3ad98f",
4+
"resourceNameTruncated": "codingdae34f16",
5+
"userPoolName": "codingcatdevdae34f16_userpool_dae34f16",
66
"autoVerifiedAttributes": [
77
"email"
88
],
@@ -28,10 +28,10 @@
2828
"userpoolClientReadAttributes": [
2929
"email"
3030
],
31-
"userpoolClientLambdaRole": "coding6e3ad98f_userpoolclient_lambda_role",
31+
"userpoolClientLambdaRole": "codingdae34f16_userpoolclient_lambda_role",
3232
"userpoolClientSetAttributes": false,
33-
"sharedId": "6e3ad98f",
34-
"resourceName": "codingcatdev6e3ad98f",
33+
"sharedId": "dae34f16",
34+
"resourceName": "codingcatdevdae34f16",
3535
"authSelections": "identityPoolAndUserPool",
3636
"authRoleArn": {
3737
"Fn::GetAtt": [
@@ -45,34 +45,20 @@
4545
"Arn"
4646
]
4747
},
48-
"useDefault": "manual",
48+
"useDefault": "defaultSocial",
4949
"hostedUI": true,
5050
"usernameAttributes": [
5151
"email"
5252
],
53-
"userPoolGroupList": [
54-
"devcodingcatdev"
55-
],
56-
"serviceName": "Cognito",
57-
"usernameCaseSensitive": false,
58-
"dependsOn": [],
59-
"thirdPartyAuth": true,
60-
"authProviders": [
61-
"graph.facebook.com",
62-
"accounts.google.com"
63-
],
64-
"userPoolGroups": true,
65-
"adminQueries": false,
66-
"triggers": "{}",
67-
"hostedUIDomainName": "codingcatdev6fd8ab57-6fd8ab57",
53+
"hostedUIDomainName": "codingcatdevdae34f16-dae34f16",
6854
"authProvidersUserPool": [
6955
"Facebook",
7056
"Google"
7157
],
7258
"hostedUIProviderMeta": "[{\"ProviderName\":\"Facebook\",\"authorize_scopes\":\"email,public_profile\",\"AttributeMapping\":{\"email\":\"email\",\"username\":\"id\"}},{\"ProviderName\":\"Google\",\"authorize_scopes\":\"openid email profile\",\"AttributeMapping\":{\"email\":\"email\",\"username\":\"sub\"}}]",
73-
"oAuthMetadata": "{\"AllowedOAuthFlows\":[\"code\"],\"AllowedOAuthScopes\":[\"phone\",\"email\",\"openid\",\"profile\",\"aws.cognito.signin.user.admin\"],\"CallbackURLs\":[\"http://localhost:3000/user/profile/\"],\"LogoutURLs\":[\"http://localhost:3000/user/profile/\"]}",
74-
"parentStack": {
75-
"Ref": "AWS::StackId"
76-
},
77-
"permissions": []
59+
"oAuthMetadata": "{\"AllowedOAuthFlows\":[\"code\"],\"AllowedOAuthScopes\":[\"phone\",\"email\",\"openid\",\"profile\",\"aws.cognito.signin.user.admin\"],\"CallbackURLs\":[\"http://localhost:3000/\"],\"LogoutURLs\":[\"http://localhost:3000/\"]}",
60+
"userPoolGroupList": [],
61+
"serviceName": "Cognito",
62+
"usernameCaseSensitive": false,
63+
"dependsOn": []
7864
}

backend/amplify/backend/auth/userPoolGroups/parameters.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)