Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't login to amplify when adding api from cli in vscode #543

Closed
anirishrnbsinger opened this issue May 17, 2022 · 6 comments
Closed

can't login to amplify when adding api from cli in vscode #543

anirishrnbsinger opened this issue May 17, 2022 · 6 comments
Labels
bug An issue which has been identified as a bug

Comments

@anirishrnbsinger
Copy link

anirishrnbsinger commented May 17, 2022

I have pasted the 'amplify pull --appId myappid --envName myenvname' into the terminal on vscode and it opens a browser window. on safari it says that I cant login, even though I have tabs open and logged in. then it says copy into chrome etc, which I have done,. It then gives me this login page but ive tried all of the many many credentials that aws uses yet I dont know which username and password they are referring to. ive tried password recovery but recieved nothing in my emails. im assuming im missing something [obvious?](url)

@anirishrnbsinger anirishrnbsinger changed the title A can't login to amplify when adding api from cli in vscode May 17, 2022
@endriv
Copy link

endriv commented May 18, 2022

Same issue on MacOs with Chrome

@adilahkb
Copy link

Hello @anirishrnbsinger and @endriv, sorry for this experience. We’re working on making the login experience better and reducing this confusion.

The username and password that you’re prompted for is applicable if you have set up users in the Access Control Settings in Amplify Studio. Based on the situation you described my assumption is that you are logging into Studio via the Amplify console as an admin, which is a valid scenario, so an update we’re making to the Studio login flow is to allow users to login with their AWS account if they choose.

We are also working on making the CLI login work for Safari browsers. I will provide an update once these changes are available. Please let me know if you have any further questions.

@renebrandel renebrandel added bug An issue which has been identified as a bug cli-login labels May 27, 2022
@renebrandel
Copy link
Contributor

Hi folks - we just launched the new Amplify CLI version 9.1.0 to address this workflow! Check out all the details here: #84 (comment)

@tech-team-rural-mda
Copy link

@renebrandel At one point the amplify CLI would always give the user the option to use a local AWS profile for authentication/permissions (see https://www.youtube.com/watch?v=2mqiZ7yqfLc). This is the preferred option for most users who are accustomed to interacting with AWS via CLI commands, so why was it removed and is there any way to re-enable this feature?

The Amplify Studio user pool interface remains buggy and unreliable. Ex.

⠙ Confirm login in the browser or manually paste in your CLI login key:
amplify-fail

@tech-team-rural-mda
Copy link

Additionally...

$ amplify pull --appId d3j37nsvqwn2dk 
🛑 No Amplify backend project files detected within this folder.

Resolution: 
Either initialize a new Amplify project or pull an existing project.
- "amplify init" to initialize a new Amplify project
- "amplify pull <app-id>" to pull your existing Amplify project. Find the <app-id> in the AWS Console or Amplify Studio.

Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

... performing the second recommendation leads to a vicious circle.

@ykethan
Copy link
Member

ykethan commented Sep 14, 2023

Hey @tech-team-rural-mda, the login error occurs if the Amplify Studio created user pool resource in your account has been modified or deleted.
I was able to reproduce by deleting the login user pool in AWS console then running the pull command.

To mitigate the issue, we can disable and re-enable studio in the AWS Amplify console, under App settings -> Amplify Studio settings, and then re-run the pull command. Do check if there are any reminiscent folders behind from the previous pull before running the amplify pull --appId <app-id> --envName dev.
By default Amplify CLI will use the Studio login if the application has Amplify Studio enabled on the backend. Amplify CLI will switch to the AWS profile selection prompt if Amplify Studio is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue which has been identified as a bug
Projects
None yet
Development

No branches or pull requests

6 participants