gpt4 book ai didi

authentication - 放大错误 : auth headless init is missing the following inputParams facebookAppIdUserPool, facebookAppSecretUserPool

转载 作者:行者123 更新时间:2023-12-04 06:46:22 24 4
gpt4 key购买 nike

G'day,

我有一个有效的 Amplify 项目。好吧,一切都很好,直到我跑 amplify add auth并将更改推送到 master。我正在按照此处的说明进行操作 https://dev.to/dabit3/the-complete-guide-to-user-authentication-with-the-amplify-framework-2inh

现在我收到以下错误,我的主人是红色的 :(

在放大文档中找不到任何有用的东西。我确实尝试运行 headless_init_env_auth.sh来自此的脚本 https://github.com/aws-amplify/amplify-cli/tree/master/packages/amplify-cli/sample-headless-scripts但它没有帮助。

这个错误似乎没有记录在任何地方。

2019-06-18T11:16:53.459Z [INFO]: Error: auth headless init is missing the following inputParams facebookAppIdUserPool, facebookAppSecretUserPool, googleAppIdUserPool, googleAppSecretUserPool
at updateConfigOnEnvInit (/root/.nvm/versions/node/v8.12.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-auth/provider-utils/awscloudformation/index.js:287:15)
at /root/.nvm/versions/node/v8.12.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-auth/index.js:201:28
at /root/.nvm/versions/node/v8.12.0/lib/node_modules/@aws-amplify/cli/node_modules/promise-sequential/index.js:16:18
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
2019-06-18T11:16:53.466Z [ERROR]: !!! Build failed
2019-06-18T11:16:53.466Z [ERROR]: !!! Non-Zero Exit Code detected```

最佳答案

定义 facebookAppIdUserPool、facebookAppSecretUserPool、googleAppIdUserPool、googleAppSecretUserPool 在 AUTHCONFIG.

#!/bin/bash
set -e
IFS='|'

AUTHCONFIG="{\
\"facebookAppId\":\"fbid1\",\
\"googleClientId\":\"goog\",\
\"facebookAppIdUserPool\":\"facebookAppId\",\
\"facebookAppSecretUserPool\":\"facebookAppSecret\",\
\"googleAppIdUserPool\":\"facebookAppSecret\",\
\"googleAppSecretUserPool\":\"googleAppSecret\"\
}"
AWSCLOUDFORMATIONCONFIG="{\
\"configLevel\":\"project\",\
\"useProfile\":true,\
\"profileName\":\"default\"\
}"

AMPLIFY="{\
\"envName\":\"dev8\"\
}"
PROVIDERS="{\
\"awscloudformation\":$AWSCLOUDFORMATIONCONFIG\
}"
CATEGORIES="{\
\"auth\":$AUTHCONFIG\
}"

amplify init \
--amplify $AMPLIFY \
--providers $PROVIDERS \
--categories $CATEGORIES \
--yes

或者可以使用 Amplify-CLI 命令
amplify init \
--amplify "{\"envName\":\"dev\"}" \
--categories "{\"auth\":{\"googleAppIdUserPool\":\"googleAppId\",\"googleAppSecretUserPool\":\"googleAppSecret\"}}" \
--yes

关于authentication - 放大错误 : auth headless init is missing the following inputParams facebookAppIdUserPool, facebookAppSecretUserPool,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56649214/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com