我已經用Feathers.js構建了一個應用程序。我的網站有這樣定義的路線:在Feathers.js中驗證路線
app.get('/login', function(req, res) {
res.render('views/login.html', {});
});
app.get('/about', function(req, res) {
res.render('views/about.html', {});
});
app.get('/contact', function(req, res) {
res.render('views/contact.html', {});
});
app.get('/', function(req, res) {
res.render('views/index.html', {});
});
我需要這四條路線以供未經驗證的用戶訪問。不過,我也有以下途徑:
app.get('/dashboard', function(req, res) {
res.render('views/dashboard/index.html', {});
});
app.get('/dashboard/report', function(req, res) {
res.render('views/dashboard/report.html', {});
});
app.get('/registered', function(req, res) {
res.render('views/registered.html', {});
});
這三條路線需要用戶與我通過谷歌驗證網站進行身份驗證。我的問題是,我如何在我的網站的某些視圖上允許匿名用戶,但需要其他人的身份驗證?我只是在authentication docs的任何地方都看不到它。它似乎是全部或沒有。我錯過了什麼嗎?