I'm using LINE login module, I am able to access the oauth page but whenever I click Allow this app to login the response is Cannot/GET views/pages/callbackurl.ejs. This is the code that I run locally
"use strict";
const app = require('express')();
const line_login = require("line-login");
const login = new line_login({
channel_id: 15818,
channel_secret: "6bfb55e907",
callback_url: "http://localhost:5000/views/pages/callbackurl.ejs",
scope: "openid profile",
prompt: "consent",
bot_prompt: "normal"
});
app.listen(process.env.PORT || 5000, () => {
console.log(`server is listening to ${process.env.PORT || 5000}...`);
});
// Specify the path you want to start authorization.
app.use("/", login.auth());
// Specify the path you want to wait for the callback from LINE authorization endpoint.
app.use("http://localhost:5000/views/pages/callbackurl.ejs", login.callback((req, res, next, token_response) => {
// Success callback
res.json(token_response);
},(req, res, next, error) => {
// Failure callback
res.status(400).json(error);
}));
channel_idandchannel_secretfrom this public question, if are valid.