amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Missing cognito settings in aws-export.js

Open marcschroeter opened this issue 7 years ago • 8 comments

Describe the bug I created a GraphQL API with cognito auth with the CLI. Cognito userpool is created but the aws-exports file looks incomplete

const awsmobile =  {
    "aws_appsync_graphqlEndpoint": "https:/xxxxxx.appsync-api.eu-west-1.amazonaws.com/graphql",
    "aws_appsync_region": "eu-west-1",
    "aws_appsync_authenticationType": "AMAZON_COGNITO_USER_POOLS",
    "aws_appsync_apiKey": "null",
};

Expected behavior I would expected further cognito configuration here, e.g:

    "aws_project_region": "us-east-1",
    "aws_cognito_identity_pool_id": "us-east-1:REDACTED",
    "aws_cognito_region": "us-east-1",
    "aws_user_pools_id": "us-east-1_REDACTED",
    "aws_user_pools_web_client_id": "REDACTED"

marcschroeter avatar Apr 02 '19 21:04 marcschroeter

@marcschroeter Which version of the Amplify CLI are you using?

amplify --version

haverchuck avatar Apr 02 '19 21:04 haverchuck

1.1.8 @haverchuck

marcschroeter avatar Apr 02 '19 21:04 marcschroeter

@marcschroeter I wasn't able to reproduce this behavior. Could you show me your terminal logs (if you still have it), as to hwo you added your API using the amplify CLI?

kaustavghosh06 avatar Apr 02 '19 21:04 kaustavghosh06

Unfortunately i dont have the terminal logs. I added the the API using amplify add api and then used graphql and choosed authorization type: cognito. How can i fix that now? @kaustavghosh06

marcschroeter avatar Apr 02 '19 22:04 marcschroeter

@marcschroeter Did you use the Amplify console to choose the authorization type?

kaustavghosh06 avatar Apr 03 '19 06:04 kaustavghosh06

Also, what's the terminal output when you run amplify status?

kaustavghosh06 avatar Apr 03 '19 06:04 kaustavghosh06

I dont know why, but now its everythings inside the file..i added S3 hosting and deleted s3 hosting again and now the cognito settings are in the file. Thank you guys.

marcschroeter avatar Apr 03 '19 06:04 marcschroeter

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

github-actions[bot] avatar May 27 '21 12:05 github-actions[bot]