Created
March 23, 2025 03:29
-
-
Save nivleshc/0f61264738374e54a7f19702fa063626 to your computer and use it in GitHub Desktop.
This gist contains code from the file cognito.tf which is part of the blog-photo-location-map repository.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_cognito_user_pool_client" "user_pool_client" { | |
name = local.cognito_user_pool_client_name | |
user_pool_id = aws_cognito_user_pool.user_pool.id | |
supported_identity_providers = ["COGNITO"] | |
# Do not generate a client secret for browser-based apps | |
generate_secret = false | |
# Allowed OAuth flows and scopes for the hosted UI. | |
allowed_oauth_flows_user_pool_client = true | |
allowed_oauth_flows = ["code"] | |
allowed_oauth_scopes = ["email", "openid", "profile"] | |
callback_urls = [ | |
"${aws_api_gateway_stage.stage.invoke_url}/fetch-object${local.cognito_callback_url_suffix}" # URL where Cognito should redirect after login | |
] | |
logout_urls = [ | |
"${aws_api_gateway_stage.stage.invoke_url}/fetch-object${local.cognito_logout_url_suffix}" # URL to redirect after logout | |
] | |
depends_on = [aws_api_gateway_stage.stage] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment