我正在使用Loopback框架(Node.js)与AngularJS(前端)和PostgreSQL(数据库)开发我的应用程序,在我的应用程序中,我使用了第三方登录“passport-google-oauth”。
在Google认证之后,回调URL将返回以下代码响应。
例如:http://localhost:3000/gauthServer 文件:routes.js
在上面的代码中,它正确地返回了我在console.log()中打印的响应。
期望结果:我希望将上述结果存储在PostgreSQL数据库中。
在Google认证之后,回调URL将返回以下代码响应。
例如:http://localhost:3000/gauthServer 文件:routes.js
app.get('/gauthServer', function(req, res) {
console.log(req.cookies.currentUserEmail);
console.log(req.cookies.currentUsername);
console.log(req.cookies.currentUserId);
console.log(req.cookies.accessToken);
//res.redirect("/");
});
在上面的代码中,它正确地返回了我在console.log()中打印的响应。
期望结果:我希望将上述结果存储在PostgreSQL数据库中。