aws-amplify / amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Apache License 2.0
2.8k stars 819 forks source link

Support adding of only Cognito Identity Pool #1633

Open desokroshan opened 5 years ago

desokroshan commented 5 years ago

Originally opened by @pai911 https://github.com/awslabs/aws-mobile-appsync-sdk-ios/issues/262

State your question Is it possible to use AWSMobileClient without using Cognito User Pool?

I am migrating from an old Cognito version, so I already set up identity pools for Facebook / Google / Developer Authenticated providers. It works fine with only Identity Pools.

In Amplify, AWSMobileClient seems to be the correct way to do the login, such as the following code snippet. (https://aws-amplify.github.io/docs/ios/authentication)

AWSMobileClient.sharedInstance().federatedSignIn

However, when I tried to use amplify add auth to add auth support, I am always asked to provide information for user pool.

Even if I followed the instruction here, I have to provide information for the Cognito User Pool.

$ cd ./YOUR_PROJECT_FOLDER
$ amplify add auth              ##"amplify update auth" if already configured
❯ Manual Configuration  
❯ User Sign-Up, Sign-In, connected with AWS IAM controls

Environment(please complete the following information):

Device Information (please complete the following information):

kaustavghosh06 commented 5 years ago

@desokroshan @mlabieniec Is the users use-case to add an existing user pool to the CLI for the Client to use? If so, they can directly add it to their awsconfiguration.json file. Note: The CLI won't overwrite it if there's no auth added through the CLI as well.

desokroshan commented 5 years ago

The use case is to be able to add auth resources via cli without having to add user pools.

kaustavghosh06 commented 5 years ago

@desokroshan Like add identity pool without adding user pool?

kaustavghosh06 commented 5 years ago

@pai911 Are we understanding your use-case correctly?

desokroshan commented 5 years ago

@desokroshan Like add identity pool without adding user pool?

Exactly

pai911 commented 5 years ago

@desokroshan @kaustavghosh06

Yes, in my app, we only use identity pools (Facebook, Google, Developer Authenticated)

However, the current CLI seems to force me to config a user pool.

Currently, is there a way to workaround this?

(After configuring with CLI, delete related user pool config manually)

kaustavghosh06 commented 5 years ago

@pai911 We don't have this feature out of the box in the CLI yet, but I'm marking this as an enhancement which we could add to the auth flow.

JoeShi commented 4 years ago

My use case: I am using a third-party user pool. And ONLY want to use identity pool.

koxon commented 1 year ago

+1 important for developer authenticated identities

a-marcel commented 1 year ago

Any news about this feature ? will this come in the near future ?