拒绝访问网页使用护照中间件的Facebook

我正在写一个“ todolist ”web应用程序。 在我的服务器端代码(node.js)中,我使用护照中间件来允许用户使用Facebooklogin。 我的一些服务器端代码:

var passport = require('passport') , FacebookStrategy = require('passport-facebook').Strategy; passport.use(new FacebookStrategy({ clientID: '5669xxxxxxxxxx', clientSecret: '555022xxxxxxxxxxxxxxxxx', callbackURL: 'http://www.localhost:3000/Todolistpage.html' }, function(accessToken, refreshToken, profile, done) { User.findOrCreate(..., function(err, user) { if (err) { return done(err); } done(null, user); }); } )); //Authentication app.get('/auth/facebook', passport.authenticate('facebook')); app.get('/auth/facebook/Todolistpage.html', passport.authenticate('facebook', { successRedirect: '/Todolistpage.html', failureRedirect: '/' })); 

1)我不知道什么“ User.findOrCreate(.. ”部分,这是用于在这里的Facebook的护照文件。

2)我的主页是在本地主机:3000 /和提供应用程序的页面是在本地主机:3000 / Todolistpage 。 我也使用快递中间件和Todolistpage.html是我的客户端文件夹中的文件。

那么我该如何防止某人插入localhost:3000 / Todolistpage.html并在没有login的情况下访问? 顺便说一句,从Fb的主页login工作正常,并redirect到本地主机:3000 / Todolistpage.html

任何答复赞赏。