It shows:Missing FORGE_CLIENT_ID or FORGE_CLIENT_SECRET env. variables
我一步一步地按照node.js教程进行操作,最后测试显示ID和密码为空值。我最终将ID和密码直接写入config.js,项目几乎没有进展。
发布于 2021-08-22 04:12:17
最简单的方法是在.vscode/launch.json中添加一个env属性,如下所示。请注意。客户端Id和密码不是您的开发者id和密码。请参阅OAuth create an app tutorial - Step 3: Note Down Your Client ID and Secret以查看您的客户端Id和密码。
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/start.js",
"env": {
"FORGE_CLIENT_ID": "",
"FORGE_CLIENT_SECRET": "",
"FORGE_CALLBACK_URL": "http://localhost:3000/api/forge/callback/oauth"
}
}
]
}https://stackoverflow.com/questions/68870083
复制相似问题