【问题标题】:Cannot GET /api/forge/oauth/callback无法获取 /api/forge/oauth/callback
【发布时间】:2020-12-10 12:37:57
【问题描述】:

我正在尝试在我自己的 Windows 机器上测试这个演示:https://github.com/Autodesk-Forge/forge-bim360-clashissue

我已经成功启动了使用这些命令运行模板。

npm install
set FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
set FORGE_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
set FORGE_CALLBACK_URL=<<YOUR CALLBACK URL>>
npm run nodemon

我在 Forge My Apps 界面中添加了一个新应用。 我添加了 BIM 360 Account 界面的规定。

我可以连接到我的本地主机,当我按允许尝试验证并登录到 Autodesk 帐户时,我被重定向到以下网站并出现以下错误:

http://localhost:3000/api/forge/oauth/callback?code=TOAq...

Cannot GET /api/forge/oauth/callback

我怎样才能克服这个错误?

【问题讨论】:

    标签: autodesk-forge


    【解决方案1】:

    看起来配置不匹配。您已将回调配置为 http://localhost:3000/api/forge/oauth/callback,但根据 https://github.com/Autodesk-Forge/forge-bim360-clashissue/blob/master/server/endpoints/oauth.endpoints.js#L72,您的服务器实际上希望回调位于不同的 URL:http://localhost:3000/api/forge/callback/oauth

    【讨论】:

      猜你喜欢
      • 2013-10-23
      • 2020-09-06
      • 1970-01-01
      • 2015-01-12
      • 1970-01-01
      • 1970-01-01
      • 2017-03-22
      • 2020-07-23
      • 2018-01-17
      相关资源
      最近更新 更多