我完成了http://learnforge.autodesk.io教程,并且在本地运行正常。但是,当我尝试将forge.tutorial.viewhubmodels.nodejs应用程序部署到Heroku时,尝试登录时出现以下错误:
GET https://forgebcsample.herokuapp.com/api/forge/oauth/token 401 (Unauthorized)
Heroku仪表板中的Config Vars正确,我在Forge Developer Portal上更新了值,如部署教程中所述。我什至尝试将FORGE_CLIENT_ID,FORGE_CLIENT_SECRET和FORGE_CALLBACK_URL硬编码到应用程序中,但错误仍然存在。
Heroku日志:
- 2018-09-07T06:59:41.950470 + 00:00 heroku [router]:at = info method = GET path =“ /” host = forgebcsample.herokuapp.com request_id = 6ef8e0d2-d814-478a-bbe2-e624789aceee fwd =“ 202.148.226.254” dyno = web.1 connect = 1ms service = 2ms status = 304 bytes = 237 protocol = https
- 2018-09-07T06:59:42.215849 + 00:00 heroku [router]:at = info method = GET path =“ / js / ForgeTree.js” host = forgebcsample.herokuapp.com request_id = 6d58c9c0-afce- 4c44-b1e0-f9d40326c607 fwd =“ 202.148.226.254” dyno = web.1 connect = 1ms service = 2ms status = 304 bytes = 238 protocol = https
- 2018-09-07T06:59:42.214891 + 00:00 heroku [router]:at = info method = GET path =“ / css / main.css” host = forgebcsample.herokuapp.com request_id = 66be297d-0707- 4e5d-8c6a-c4fb269c11f0 fwd =“ 202.148.226.254” dyno = web.1 connect = 1ms service = 2ms status = 304 bytes = 237 protocol = https
- 2018-09-07T06:59:42.453624 + 00:00 heroku [router]:at = info method = GET path =“ / js / ForgeViewer.js” host = forgebcsample.herokuapp.com request_id = bc8f0050-1ca2- 46b9-84be-d1e36c8afcf4 fwd =“ 202.148.226.254” dyno = web.1 connect = 1ms service = 4ms status = 304 bytes = 237 protocol = https
- 2018-09-07T06:59:43.486820 + 00:00 heroku [router]:at = info method = GET path =“ / api / forge / oauth / token” host = forgebcsample.herokuapp.com request_id = d6acdca3- 1424-48b9-9480-d0497af58179 fwd =“ 202.148.226.254” dyno = web.1 connect = 1ms service = 2ms status = 401 bytes = 127 protocol = https
- 2018-09-07T07:00:51.391643 + 00:00 heroku [router]:at = info method = GET path =“ / api / forge / oauth / url” host = forgebcsample.herokuapp.com request_id = ab185f67- 7288-43ce-bdf7-9551b8771bba fwd =“ 202.148.226.254” dyno = web.1 connect = 1ms service = 2ms status = 200 bytes = 382 protocol = https
- 2018-09-07T07:00:58.551942 + 00:00 heroku [router]:at = info method = GET path =“ / api / forge / callback / oauth?code = 46TAvefGUSv_xZ6cTJKzyx-t-HT6Y2FzvDyzZQIS” host = forgebcsample .herokuapp.com request_id = b67abc9f-419e-47d3-892a-3fcc6fbf7f7d fwd =“ 202.148.226.254” dyno = web.1 connect = 1ms service = 227ms status = 302字节= 234协议= https
- 2018-09-07T07:00:58.808686 + 00:00 heroku [router]:at = info method = GET path =“ /” host = forgebcsample.herokuapp.com request_id = 1a2ff1de-513e-40e2-a73a-0b48781a06bc fwd =“ 202.148.226.254” dyno = web.1 connect = 1ms服务= 17ms状态= 304字节= 237协议= https
- 2018-09-07T07:00:59.082869 + 00:00 heroku [router]:at = info method = GET path =“ / css / main.css” host = forgebcsample.herokuapp.com request_id = 428a5759-895f- 45e5-a9db-48d8721889c0 fwd =“ 202.148.226.254” dyno = web.1 connect = 1ms service = 5ms status = 304 bytes = 237 protocol = https
- 2018-09-07T07:00:59.325093 + 00:00 heroku [router]:at = info method = GET path =“ / js / ForgeTree.js” host = forgebcsample.herokuapp.com request_id = 04a300dc-8697- 4097-8c06-1788e21db69d fwd =“ 202.148.226.254” dyno = web.1 connect = 1ms service = 3ms status = 304 bytes = 238 protocol = https
- 2018-09-07T07:00:59.822084 + 00:00 heroku [router]:at = info method = GET path =“ / js / ForgeViewer.js” host = forgebcsample.herokuapp.com request_id = c601f61e-cfea- 4738-8837-540941adaf96 fwd =“ 202.148.226.254” dyno = web.1 connect = 1ms服务= 11ms状态= 304字节= 237协议= https
- 2018-09-07T07:01:00.157419 + 00:00 heroku [router]:at = info method = GET path =“ / api / forge / oauth / token” host = forgebcsample.herokuapp.com request_id = 77b86dc0- 50c7-429e-ade9-82e1b8fa56db fwd =“ 202.148.226.254” dyno = web.1 connect = 1ms service = 2ms status = 401字节= 127协议= https