Describe the bug
Running the v1 auto migration created a new cognito userpool and attached it to my API, making it impossible for my users to log in.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Migration should use existing configured userpool, not create a new one
Desktop (please complete the following information):
Additional context
amplify-cli: v1.0.5
Help!
How can I hook back up the original userpool?
You can visit the user pool console and place the cognito ID in your aws_exports.js file for your app to use the intended user pool. That being said did you manually configure the cognito user pool CloudFormation template previously?
I'll try that. I generated the userpool using the amplify cli. However, I did manually modify the template add email as the username attribute.
It looks like it will be more than just that. It also deleted the app clients from the original userpool, except for the client I manually created for using from the AppSync console.
And if I replace the values in aws-exports.js, will they be overridden by the cli at some point?
I have not migrated yet to v1 but it seems I might run into this as well because I also manually modified the cognito cloudformation file. @flybayer it's not clear from your comments, but were you able to resolve this / find a workaround? I wouldn't want my cognito user pool to be permanently borked and I hope that did not happen.
@hisham So the CLI migrates your AppSync API first (to make use of custom resolvers), then it changes auth CFN files locally and then before pushing, you would be prompted whether you want to push the resources or not. I would recommend you to say 'No' in your case for 'pushing' the changed CFN files and make sure you do a git diff and incorporate changes in the modified CFN to reflect your current cloudformation modifications (specially tied to immutable CFN attributes like sign in/sign up attributes).
Sounds good, will do when I migrate. Thanks @kaustavghosh06
fyi - was able to migrate successfully following @kaustavghosh06's instructions. Checking the diff on the auth cloudformation files was a must as some customizations I made were removed and I had to add them back in before pushing.