K
K
KirylLapouski2018-05-18 11:24:57
JavaScript
KirylLapouski, 2018-05-18 11:24:57

How to use passport js along with loopback?

I'm trying to add Yandex login to my application using passport js. The problem occurs when following a callback link. An error is thrown out that there is no login.html page on the server, although I did not prescribe to render this page with such a url. All that should happen at this url is to print a message to the console.
Here is the error stack:

Unhandled error for request GET /login.html: Error: Cannot GET /login.html
    at raiseUrlNotFoundError (D:\Dropbox\testManager\test-manager-api\node_modules\loopback\server\middleware\url-not-found.js:21:17)
    at Layer.handle [as handle_request] (D:\Dropbox\testManager\test-manager-api\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (D:\Dropbox\testManager\test-manager-api\node_modules\express\lib\router\index.js:317:13)
    at D:\Dropbox\testManager\test-manager-api\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (D:\Dropbox\testManager\test-manager-api\node_modules\express\lib\router\index.js:335:12)
    at next (D:\Dropbox\testManager\test-manager-api\node_modules\express\lib\router\index.js:275:10)
    at D:\Dropbox\testManager\test-manager-api\node_modules\express-flash\lib\express-flash.js:31:7
    at D:\Dropbox\testManager\test-manager-api\node_modules\connect-flash\lib\flash.js:21:5
    at D:\Dropbox\testManager\test-manager-api\node_modules\express-flash\lib\express-flash.js:22:5
    at Layer.handle [as handle_request] (D:\Dropbox\testManager\test-manager-api\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (D:\Dropbox\testManager\test-manager-api\node_modules\express\lib\router\index.js:317:13)
    at D:\Dropbox\testManager\test-manager-api\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (D:\Dropbox\testManager\test-manager-api\node_modules\express\lib\router\index.js:335:12)
    at next (D:\Dropbox\testManager\test-manager-api\node_modules\express\lib\router\index.js:275:10)
    at D:\Dropbox\testManager\test-manager-api\node_modules\express\lib\router\index.js:635:15
    at next (D:\Dropbox\testManager\test-manager-api\node_modules\express\lib\router\index.js:260:14)

And the file file describing the operation of the server is located here https://github.com/KirylLapouski/testManager/blob/...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question