i trying use ensuresignedin plugin on routes except front 'home' page has buttons login separate parts of site.
here's route 'home':
router.route('/', function () { this.render('home'); });
here's line plugin , exceptions:
router.plugin('ensuresignedin', { except: ['home', 'atsignin', 'atsignup', 'atforgotpassword'] });
both snippets lib/routes.js file, if makes difference. i've tried adding different route names in except: portion, , correctly excepted, can't life of me 'home' route not show "must logged in".
i've googled , read through github issues , haven't seen else problem, it's i'm doing wrong , not bug useraccounts or iron-router.
set name of /
route root
, add route name ensuresignedin
settings:
router.route('/', { name: 'root', template: 'home', action: function() { this.render(); } }); router.plugin('ensuresignedin', { except: ['root', 'atsignin', 'atsignup', 'atforgotpassword', 'atresetpwd'] });