amplify-cli: Google sign in not working since latest version of amplify-cli

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

No response

Amplify CLI Version

10.6.0

What operating system are you using?

AWS Amplify default build container (amazonlinux:2)

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No changes, same backend resources work with amplify ci/cd when setting Amplify CLI to 10.5.2 in AWS Console -> Amplify -> Build Settings -> Build image settings

Describe the bug

When pushing to the connected branch, amplify CI/CD triggers and redeploys the backend and hosting environments. During redeploy, even though we don’t have any auth or Cognito changes, we receive:

The following resources failed to deploy:
                                 Resource Name: HostedUIProvidersCustomResourceInputs (Custom::LambdaCallout)

When checking the lambda that is called by the Auth CFM template, the error there is:

InvalidParameterException: client_id, client_secret and authorize_scopes are all required idp details.    at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27)    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:686:14)    at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)    at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)    at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:688:12)    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18) | 2023-01-04T09:58:48.250Z 4a312ff4-4a2a-4dc8-8d06-20e94d46de12 INFO InvalidParameterException: client_id, client_secret and authorize_scopes are all required idp details. at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27) at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:686:14) at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10) at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12) at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9) at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:688:12) at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
-- | --

We have correct AMPLIFY_GOOGLE_CLIENT_ID, AMPLIFY_GOOGLE_CLIENT_SECRET in AWS Amplify Console and auth category in team-provider-info.json.

If we change the Amplify CLI version like this: image and then redeploy using the Redeploy this version button, everything works as expected.

Expected behavior

  1. Backend and Hosting redeploy passes

Reproduction steps

  1. Push something to an Amplify CI/CD connected branch

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 17 (8 by maintainers)

Most upvoted comments

+1

10.6.0 have broken google auth as well as all cognito triggers in my project

@josefaidt just keep in mind, the problem in here is only present after amplify cli 10.5.2 and only in the AWS console/automated amplify CICD. If we try to push locally, we are able to, so I am not sure the case is the same as https://github.com/aws-amplify/amplify-cli/issues/9183.

I think the difference is that locally we rely on deployment-secrets.json, but on the AWS Console there are AMPLIFY_GOOGLE_CLIENT_ID and AMPLIFY_GOOGLE_CLIENT_SECRET, which do not get respected after 10.5.2.