Skip to content

ensureSignedIn and layoutTemplates #9

@gru99

Description

@gru99

I seem to have a problem. I switched to layoutTemplates in Iron Router and the ensureSignedIn-Plugin started to misbehave (it took me some time to realise as I was signed in for a few weeks). When I try to access /assign the layout template is displayed for a short moment, then he obviously notices, that I'm not logged in anymore – but instead of redirecting me to a login page, he just serves the yieldTemplates. If I switch back to "template: 'home'" for this route (i.e. without a layoutTemplate) everything's fine.

Router.plugin('ensureSignedIn', {
except:['root', 'atSignIn', 'atSignUp', 'atForgotPassword', 'atResetPwd']
});

Router.route('assignRoute', {
path: '/assign',
layoutTemplate: 'mainTemplate',
loadingTemplate: 'loading',
yieldTemplates: {
'home': {to: 'main'},
'filterMenu': {to: 'menu'}
}
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions