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

auth headless is missing the following inputParameters googleAppIdUserPool, googleAppSecretUserPool

Open redjonzaci opened this issue 2 years ago • 8 comments

Amplify CLI Version

12.3.0

Question

I went through the following issue: https://github.com/aws-amplify/amplify-cli/issues/9176 and the following docs: https://docs.amplify.aws/javascript/tools/cli/usage/headless/#headless-category-payloads, but I don't understand how to utilize amplify update auth --headless in the CI/CD pipeline. Currently, we just do amplifyPush --simple to build the backend. Where does that fit in?

redjonzaci avatar Dec 21 '23 17:12 redjonzaci

Hey @redjonzaci, thank you for reaching out. Could you try adding the OAuth parameters as environment variables and rebuild on Amplify hosting , AMPLIFY_GOOGLE_CLIENT_ID, AMPLIFY_GOOGLE_CLIENT_SECRET environment variables are accessible by default within the Amplify console. Please refer to the documentation similar issue: https://github.com/aws-amplify/amplify-hosting/issues/2039#issuecomment-1132790185

ykethan avatar Dec 21 '23 18:12 ykethan

Trying it now, but it seems like the repeated issue needs a documentation / error message update?

redjonzaci avatar Dec 21 '23 18:12 redjonzaci

@ykethan it worked, thank you!

redjonzaci avatar Dec 21 '23 20:12 redjonzaci

@redjonzaci glad to hear that, i am working on a reproduction for this behavior.

Note: https://github.com/aws-amplify/amplify-cli/issues/11010: Tried reproducing using the steps on this issue but was not able to reproduce the issue.

ykethan avatar Dec 21 '23 20:12 ykethan

We had an existing app and then did amplify update auth. On next PR, we got the error.

redjonzaci avatar Dec 21 '23 20:12 redjonzaci

On diving deeper it appears the amplifyPush --simple runs a headless pull and init push without the auth config. adding the client config as environment variables should add the auth config on the push.

Closing the issue.

ykethan avatar Dec 22 '23 18:12 ykethan

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Dec 22 '23 18:12 github-actions[bot]

Problem : auth headless is missing the following inputParameters googleAppIdUserPool, googleAppSecretUserPool...

Solution: amplify pull --appId d2w68xxxxxxxxx --envName dev (get the appid from your amplify backend)

danny33118 avatar Jan 12 '24 04:01 danny33118