Skip to content

Missing AdminLinkProviderForUser in auth actions mapping #5790

@malaquf

Description

@malaquf

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    authIssues related to the Auth Categoryfeature-requestA request for a new feature or an enhancement to an existing API or category.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions