修改后 Bluemix 身份验证错误 node.js

Bluemix Authentication Error after modify node.js

我使用 Mobilefirst Client Access 服务的移动应用程序无法登录,在服务器端,我看到以下错误。 在我修改 server.js 之前它一直有效。我添加了一些 HTTP GET/PUT/POST 端点。该应用程序确实启动了,我可以使用浏览器测试这些端点。但是移动应用随后会抛出错误 02-04 14:07:28.247 13660-13700/com.ibm.bluelist E/SplashActivityLoginFail: Failed to login: Response: 02-04 14:07:28.247 13660-13699/com.ibm.bluelist E/mfpsdk.AuthorizationProcessManager: AuthorizationProcessManager.handleAuthorizationFailure in AuthorizationProcessManager.java:426 :: authorization process failed

服务器端错误:

Error: Cannot POST /apps/272690ba-3a01-4f82-8f79-293688c5b1de/customAuthRealm_1/startAuthorization
at raiseUrlNotFoundError (/home/vcap/app/node_modules/loopback/server/middleware/url-not-found.js:15:17)
at Layer.handle [as handle_request] (/home/vcap/app/node_modules/loopback/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/vcap/app/node_modules/loopback/node_modules/express/lib/router/index.js:312:13)
at /home/vcap/app/node_modules/loopback/node_modules/express/lib/router/index.js:280:7
at Function.process_params (/home/vcap/app/node_modules/loopback/node_modules/express/lib/router/index.js:330:12)
at next (/home/vcap/app/node_modules/loopback/node_modules/express/lib/router/index.js:271:10)
at serveStatic (/home/vcap/app/node_modules/loopback/node_modules/express/node_modules/serve-static/index.js:74:16)
at Layer.handle [as handle_request] (/home/vcap/app/node_modules/loopback/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/vcap/app/node_modules/loopback/node_modules/express/lib/router/index.js:312:13)
at /home/vcap/app/node_modules/loopback/node_modules/express/lib/router/index.js:280:7

Node.js "cf push" 推送的应用程序在使用 Bluemix DevOps 服务时不会被拉取。 DevOps 服务中的代码只是开始包。 我使用 cf push 并从 bluelist 示例中推送自定义身份验证和 cloudant 注册应用程序。然后当我编辑 server.js 并在 DevOPs 服务中重新部署它时,它消除了客户身份验证,从而消除了身份验证错误。 我已将它们迁移到基于 LoopBack 框架的入门包。它现在有效。 仁