Closed jsgphd closed 2 years ago
Hi @jsgphd π I wasn't able to reproduce this on the latest version of the CLI (7.6.3) but I'll transfer this over to the CLI repo for better support. Thanks for raising this issue!
Hey @jsgphd :wave: are you also experiencing this with the latest version of the CLI?
Hey @jsgphd wave are you also experiencing this with the latest version of the CLI?
Same issue. I just upgraded to v7.6.3, removed my aws-config.js (just to be sure it was recreated), and did a amplify pull. It recreated the aws-config with the aws_cognito_social_providers having ONLY the google and is still missing the other social providers.
Thanks for trying that out @jsgphd ! Can you verify that walking through amplify update auth
> Update OAuth Social Providers
shows the correct social providers enabled?
I first show the version and then show the amplify update auth settings.
The aws-config.js shows:
"oauth": { "domain": "mwirewww-live.auth.us-east-1.amazoncognito.com", "scope": [ "phone", "email", "openid", "profile", "aws.cognito.signin.user.admin" ], "redirectSignIn": "https://app.mwire.io/auth/", "redirectSignOut": "https://app.mwire.io/awsauth/", "responseType": "code" }, "federationTarget": "COGNITO_USER_POOLS", "aws_cognito_username_attributes": [ "EMAIL" ], "aws_cognito_social_providers": [ "GOOGLE" ], "aws_cognito_signup_attributes": [ "EMAIL" ], "aws_cognito_mfa_configuration": "OFF", "aws_cognito_mfa_types": [ "SMS" ], "aws_cognito_password_protection_settings": { "passwordPolicyMinLength": 8, "passwordPolicyCharacters": [] }, "aws_cognito_verification_mechanisms": [ "EMAIL" ],
Thanks @jsgphd for clarifying! Can you verify the contents of amplify/backend/auth/<resource-name>/cli-inputs.json
has the following:
"authProvidersUserPool": [
"Facebook",
"Google",
"LoginWithAmazon"
],
"hostedUIProviderMeta": "[{\"ProviderName\":\"Facebook\",\"authorize_scopes\":\"email,public_profile\",\"AttributeMapping\":{\"email\":\"email\",\"username\":\"id\"}},{\"ProviderName\":\"Google\",\"authorize_scopes\":\"openid email profile\",\"AttributeMapping\":{\"email\":\"email\",\"username\":\"sub\"}},{\"ProviderName\":\"LoginWithAmazon\",\"authorize_scopes\":\"profile profile:user_id\",\"AttributeMapping\":{\"email\":\"email\",\"username\":\"user_id\"}}]",
This should also be shown in the build/parameters.json
file.
May you also verify whether running amplify env checkout <current-env-name>
updates the aws-exports.js file as expected?
Thanks @josefaidt:
Running amplify env checkout
My cli-inputs has this: "authProvidersUserPool": [ "Facebook", "Google", "LoginWithAmazon" ], "hostedUIProviderMeta": "[{\"ProviderName\":\"Facebook\",\"authorize_scopes\":\"email,public_profile\",\"AttributeMapping\":{\"email\":\"email\",\"username\":\"id\"}},{\"ProviderName\":\"Google\",\"authorize_scopes\":\"openid email profile\",\"AttributeMapping\":{\"email\":\"email\",\"username\":\"sub\"}},{\"ProviderName\":\"LoginWithAmazon\",\"authorize_scopes\":\"profile profile:user_id\",\"AttributeMapping\":{\"email\":\"email\",\"username\":\"user_id\"}}]",
My build/parameters.json does not exist as I run it using "start:dev"
However I just ran a build and it still doesn't have a parameter.json file in that build directory.
Ah my apologies @jsgphd that parameters path should be amplify/backend/auth/<resource-name>/build/parameters.json
. Do you mind emailing a sharable link to a zip file of your amplify/
directory to further investigate? I am unable to reproduce this issue
I have a lot of confidential info in there so I can't send you a zip. BUT we can do a screen share together to help debug it? Send email to jason@mwire.io to move off this public forum to schedule that.
that build file has:
{ "CreateAPIKey": 1, "AppSyncApiName": "mwireLiveAPI", "DynamoDBBillingMode": "PAY_PER_REQUEST", "DynamoDBEnableServerSideEncryption": false, "AuthCognitoUserPoolId": { "Fn::GetAtt": [ "authmwirewwwf17149d1", "Outputs.UserPoolId" ] }, "authRoleName": { "Ref": "AuthRoleName" }, "S3DeploymentBucket": "amplify-mwirewww-live-103449-deployment", }
Hey @jsgphd sure! And that output looks to be the contents of your GraphQL API's parameters.json
Sorry! So this must be the issue, it doesn't match the cli-inputs for some reason.
"authProvidersUserPool": [
"Google"
],
"hostedUIProviderMeta": "[{\"ProviderName\":\"Google\",\"authorize_scopes\":\"openid email profile\",\"AttributeMapping\":{\"email\":\"email\",\"username\":\"sub\"}}]",
Hi @jsgphd Could you please share the version with which you had originally configured Auth for ( Facebook, Google and Amazon) prior to the problem mentioned ( https://github.com/aws-amplify/amplify-cli/issues/9313#issuecomment-994832238 )
Donβt remember. But, still wondering how to fix this issue? Should I delete all social and recreate or something else? I really need a work around already please.
Hi @jsgphd, when you updated from using just 1 social provider to 3, did you updated through the amplify command, amplify update auth
or did you updated the user pool in the console and followed with amplify pull
?
I think it was on the console and then I did a pull... Then I tried adding it locally and pushing... to try to get it to work. Any idea how to fix this (a work around) on my side to get it to work now?
On Tue, Jan 4, 2022 at 1:41 PM Pavel Lazar @.***> wrote:
Hi @jsgphd https://github.com/jsgphd, when you updated from using just 1 social provider to 3, did you updated through the amplify command, amplify update auth or did you updated the user pool in the console and followed with amplify pull ?
β Reply to this email directly, view it on GitHub https://github.com/aws-amplify/amplify-cli/issues/9313#issuecomment-1005075567, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC2EC2HEIF5DQ5UL5C62ONDUUM5NVANCNFSM5KCE63PA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
While I'm looking into it. Can you try to do a amplify remove auth && amplify push
followed by an amplify add auth
and add all 3 social providers and then amplify push
?
Manual changes in the console on a user pool followed by amplify pull
is not supported. I am unable to reproduce the issue by adding/updating the user pool using amplify add auth/amplify update auth
followed by amplify pull
. If you still need to use the original user pool and cannot create a new one, you should be able to do amplify remove auth
followed by amplify auth import
.
Please let us know if the provided information helped.
Manual changes in the console on a user pool followed by
amplify pull
is not supported. I am unable to reproduce the issue by adding/updating the user pool usingamplify add auth/amplify update auth
followed byamplify pull
. If you still need to use the original user pool and cannot create a new one, you should be able to doamplify remove auth
followed byamplify auth import
.Please let us know if the provided information helped.
My have similar issue. I have configured Google
and OpenID Connect
in the console.
I tried to run amplify remove auth
then amplify auth import
, but only see the
"aws_cognito_social_providers": [ "GOOGLE" ]
I'm using amplify cli 7.6.5.
Closing due to inactivity. @jsgphd if you are still experiencing this issue please reply back to this thread and we can re-open to investigate further π
@vifox001 if you are also still experiencing your issue please create a separate bug
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.
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
I added three social providers as you can see pics ss6 and ss2 and when I use the hosted login it shows all three as you can see in ss3. However it is not adding it properly to aws-exports.js properly as you can see in ss1. It only adds:
If I manually edit the aws-exports.js and make it: "aws_cognito_social_providers": [ "GOOGLE", "FACEBOOK", "AMAZON" ], then it works as expected and shows all the logins. However you are are not allowed to manually edit aws-exports.js as it gets overridden. I am not sure why this is not working. I have re-done pulls and pushes but for some reason it won't update that aws_cognito_social_providers entry.
Expected behavior
I would expect the social providers to be:
Reproduction steps
I had first added google as a social signon, but then later added facebook and amazon. perhaps it is related to subsequent adds of social signons.
ALSO, I just added a custom domain auth.mwire.io, perhaps that is related to the issue?
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots