#How to share User table between apps

8 messages · Page 1 of 1 (latest)

wintry sparrow
#

I have a Flutter mobile app that is run with an Amplify app as the backend. This app has users that have been created through the project (via the 'User Management' section). It also has other models.

I successfully used that app's backend in a Flutter webapp project that is also an Amplify app (but includes a front end that's hosted in Amplify), but I'm unable to use the same the User pool.

Can this be done? And if so, how?

Thanks!

ashen trench
#

Hi @wintry sparrow - so you have two Amplify apps you're saying? Is there a reason you could not use a single app shared between all of your frontend projects?

wintry sparrow
#

@ashen trench That was my initial thought, but it's not ideal. We will likely have multiple repositories and I believe you can only link different branches from the same repository to be the frontend of an app, right? Is there no other way to get access to the other app's user pool?

ashen trench
wintry sparrow
#

@ashen trench Yeah, I was looking at that. I'll try it out. I'm a little confused about the difference between a cognito user pool and an app user pool.

ashen trench
#

They're the same. Amplify Studio provides a nicer interface than the AWS Console, but they are backed by the same user pool. To use the import command you would need to ID of the Cognito User Pool and Identity Pool.

wintry sparrow
#

Thanks @ashen trench I'll let you know if I run into any issues

wintry sparrow
#

Hey @ashen trench I think this works, but now I'm not sure if I did the first part right and am a little confused.
I ended up started fresh after doing an amplify delete.
Then I did an amplify init and created a new app in the amplify backend.
I'm confident that I can do the amplify import auth and get the users table, but what is the correct way to go about sinking up the models and API functionality of the other app I have? Is it to do an amplify pull --appid --environment? or should I do something in the GUI?