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

Missing AdminLinkProviderForUser in auth actions mapping #5790

Open
1 of 14 tasks
malaquf opened this issue Dec 27, 2024 · 1 comment
Open
1 of 14 tasks

Missing AdminLinkProviderForUser in auth actions mapping #5790

malaquf opened this issue Dec 27, 2024 · 1 comment
Assignees
Labels
auth Issues related to the Auth Category question A question about the Amplify Flutter libraries

Comments

@malaquf
Copy link

malaquf commented Dec 27, 2024

Description

Hello!
I was trying to link existing social accounts with same email and I am currently stuck trying to add AdminLinkProviderForUser permission to the lambda role.
No action seem to map it (see this list), and trying to link it manually cause a circular dependency.

Thanks for handling it.

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

e.g.:

export const preSignUp = defineFunction({
  name: "pre-sign-up",
  resourceGroupName: 'auth',
});
...
export const auth = defineAuth({
...
  triggers: {
    preSignUp
  },
  access: (allow) => [
    allow.resource(preSignUp).to([
      'listUsers',
      'manageUsers'
    ])
  ],
});
...

const backend = defineBackend({
  auth,
  data,
  preSignUp
});

const authArn = backend.auth.resources.userPool.userPoolArn;
backend.preSignUp.resources.lambda.addToRolePolicy(
  new iam.PolicyStatement({
    sid: 'AllowCognitoOperations',
    effect: Effect.ALLOW,
  actions: [
    'cognito-idp:ListUsers',
    'cognito-idp:AdminLinkProviderForUser',
    'cognito-idp:ListIdentityProviders',
  ],
  resources: [authArn],
}));

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.27.1

Amplify Flutter Version

2.5.0

Deployment Method

Amplify Gen 2

Schema

No response

@github-actions github-actions bot added pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Dec 27, 2024
@ekjotmultani
Copy link
Member

ekjotmultani commented Dec 27, 2024

Hi @malaquf, I see the problem you are facing and I'm sorry you are getting this issue, let me investigate this and get back to you with an update.

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Dec 27, 2024
@ekjotmultani ekjotmultani self-assigned this Dec 27, 2024
@ekjotmultani ekjotmultani added auth Issues related to the Auth Category question A question about the Amplify Flutter libraries labels Jan 2, 2025
@github-actions github-actions bot removed the pending-triage This issue is in the backlog of issues to triage label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues related to the Auth Category question A question about the Amplify Flutter libraries
Projects
None yet
Development

No branches or pull requests

2 participants