-
Notifications
You must be signed in to change notification settings - Fork 6
/
aws_resources.yaml
80 lines (75 loc) · 2.31 KB
/
aws_resources.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# This setup is just intended for local development. If you want to use it
# in production, you probably want to edit the callback and logout URLs to
# include your hostnames. Additionally you'll want to check the Cognito
# schema and potentially add more attributes.
Parameters:
CognitoCustomDomainName:
Type: String
Description: Unique for your user pool
Resources:
UserPool:
Type: AWS::Cognito::UserPool
Properties:
UsernameAttributes:
- "email"
UsernameConfiguration:
CaseSensitive: false
Schema:
- Mutable: true
Name: "email"
Required: true
- Mutable: true
Name: "name"
Required: true
AutoVerifiedAttributes:
- "email"
UserPoolDomain:
Type: AWS::Cognito::UserPoolDomain
Properties:
Domain:
Ref: CognitoCustomDomainName
UserPoolId:
Ref: UserPool
UserPoolClient:
Type: AWS::Cognito::UserPoolClient
Properties:
UserPoolId:
Ref: UserPool
AllowedOAuthFlows:
- "implicit"
- "code"
AllowedOAuthFlowsUserPoolClient: true
AllowedOAuthScopes:
- "email"
- "openid"
- "profile"
CallbackURLs:
# For local development, the port varies sometimes
- "http://localhost:5000/login/cognito/authorized"
- "http://localhost:8000/login/cognito/authorized"
- "http://localhost:8050/login/cognito/authorized"
- "http://localhost:3000/login/cognito/authorized"
# For local end-to-end-tests
# - "http://localhost/login/cognito/authorized"
# - "http://localhost/some/prefix/login/cognito/authorized"
GenerateSecret: true
LogoutURLs:
# For local development, the port varies sometimes
- "http://localhost:5000/"
- "http://localhost:8000/"
- "http://localhost:8050/"
- "http://localhost:3000/"
# For local end-to-end-tests
# - "http://localhost/"
# - "http://localhost/some/prefix/"
SupportedIdentityProviders:
- "COGNITO"
Outputs:
UserPoolId:
Description: Identifier of the User Pool
Value: !Ref UserPool
CognitoDomain:
Description: DNS Prefix of your Cognito Domain
Value: !Ref CognitoCustomDomainName
CognitoOAuthClientId:
Value: !Ref UserPoolClient