Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ccm 8434 cis2 signout #152

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

harrim91
Copy link

@harrim91 harrim91 commented Jan 28, 2025

Description

Signing out from an OAuth provider in Amplify requires logout redirect urls to be configured in the Amplify config, and in the Cognito User Pool Client.

This PR configures the web app and the user pool client to redirect to the sign-in page on OAuth signout.

This was the existing behaviour - the existing redirect logic seems to kick in before the Cognito redirect anyway. It just stops an error from being thrown in the console.

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@harrim91 harrim91 requested a review from a team as a code owner January 28, 2025 16:37
logout_urls = flatten([
var.cognito_user_pool_additional_callback_urls,
[
"https://${var.environment}.${local.acct.dns_zone["name"]}/auth/",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as we've learned from other recent bug fixes, we probably don't want the trailing slashes at the end of callback_urls and logout_urls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants