Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrate existing AWS Cognito user pool into iOS project with Amplify

I am trying to add AWS Cognito to my iOS application using AWS Amplify. The docs suggest to use amplify add auth on the CLI, but this does not seem to work with an existing User Pool (i.e. you have to create a new one). Is it possible to integrate AWS Cognito into my iOS (Swift) project using an existing User Pool?

like image 474
sluijs Avatar asked Nov 15 '18 07:11

sluijs


People also ask

How do I add Cognito to amplify?

Import existing Amazon Cognito resources into your Amplify project. Get started by running amplify import auth command to search for & import an existing Cognito User Pool & Identity Pool in your account. The amplify import auth command will: automatically populate your Amplify Library configuration files (aws-exports.

Does amplify use Cognito?

Amplify uses Amazon Cognito as the main authentication provider. Amazon Cognito is a robust user directory service that handles user registration, authentication, account recovery & other operations.

Can I use Cognito as an IdP?

IT pros typically use a third-party IdP for this function. However, a Cognito user pool is its own IdP. If an identity pool is configured correctly, it can use the app's user pools as an IdP. This way, users authenticate via user pools and are assigned IAM roles via identity pools.


1 Answers

Update: Since 2020 Amplify allows you to use existing User Pools (yeah!). Just run:

amplify import auth

Source: https://aws.amazon.com/de/about-aws/whats-new/2020/10/use-existing-cognito-user-pools-identity-pools-for-amplify-project/

like image 81
morgler Avatar answered Oct 17 '22 04:10

morgler