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

Migration: Codegen support for Gen2 reference auth from Gen1 import auth #14011

Merged
merged 10 commits into from
Nov 12, 2024

Conversation

abhi7cr
Copy link
Contributor

@abhi7cr abhi7cr commented Nov 12, 2024

Description of changes

Add Codegen support for Gen2 reference auth from Gen1 import auth.
Note: we codegen the references to all the userpool groups by default. Users could later remove the ones they don't need to reference in other categories.

Example output:

import { referenceAuth } from "@aws-amplify/backend";
export const auth = referenceAuth({
    userPoolId: "userPoolId",
    userPoolClientId: "userPoolClientId",
    identityPoolId: "identityPoolId",
    unauthRoleArn: "unauthRoleArn",
    authRoleArn: "authRoleArn",
    groups: {
        Admin: "admin",
        ReadOnly: "readOnly"
    }
});

Description of how you validated changes

Ran codegen command, updated Gen2 backend package to a tagged release that supports refAuth and ran npx sandbox deploy.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@abhi7cr abhi7cr requested a review from a team as a code owner November 12, 2024 00:01
const mockUserPoolID = 'UserPoolId';
const mockIdentityPoolName = 'mockIdentityPoolName';
const mockIdentityPoolId = 'IdentityPoolId';
const mockAppClientId = 'AppClientID';
Copy link
Contributor

Choose a reason for hiding this comment

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

what are we doing about the other client id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@abhi7cr abhi7cr merged commit 39821ae into migrations Nov 12, 2024
5 checks passed
@abhi7cr abhi7cr deleted the gen2-codegen-ref-auth branch November 12, 2024 21:52
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