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

feat(cognito): verify SSO users and migrate #11

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

samueljamesbliss
Copy link
Collaborator

Following this https://app.clickup.com/t/86aya49x7

Summary:

We want to support partner's using SSO, for now just google.
The current migration lambda does not run when a user signs in via google sso, as it will always go to pre-signup.
We can handle this issue by allowing an SSO user to be created in pre-sign up, then we can migrate the user data in the post confirmation lambda.

Changes:

Creates an interface to calm TS down with the api call (UserResponse)
Create new API call get_sso_user_attributes to retrieve user attributes for migration
Adds attributes to event being returned to Cognito
Update user on the partner's Cognito pool (this will require the partner to ensure their lambda role has the cognito-idp:AdminUpdateUserAttributes permission)
Updated the test

How to Test

This branch is currently pushed to staging, except with mock data instead of hitting the Jane backend (waiting for endpoint to be deployed).
The cognito pool jane-sandbox on AWS is linked to it and has its lambdas working as expected now

Copy link
Collaborator

@omar-sr88 omar-sr88 left a comment

Choose a reason for hiding this comment

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

We went over this a lot on pairing sessions, code is good

@samueljamesbliss samueljamesbliss merged commit 48dbb51 into master Oct 18, 2023
1 check passed
@github-actions
Copy link

🎉 This PR is included in version 1.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants