meteor-useraccounts / flow-routing

Useraccounts packages add-on for integration with Flow Router and Blaze Layout.
https://atmospherejs.com/useraccounts/flow-routing
MIT License
72 stars 50 forks source link

Redirect after login from protected route is broken #31

Open todda00 opened 8 years ago

todda00 commented 8 years ago

I have all routes protected except user account routes as follows:

FlowRouter.triggers.enter([AccountsTemplates.ensureSignedIn],{except: ['atSignIn', 'atForgotPwd', 'atResetPwd', 'atEnrollAccount']});

When presented with the login form by going to a protected route, then signing in, a blank page is shown with the following console error:

Error: FlowRouter.redirect is not a function
TypeError: FlowRouter.redirect is not a function
    at AccountsTemplates.postSubmitRedirect (client.js:130)
    at AccountsTemplates.submitCallback (client.js:221)
    at at_pwd_form.js:174
    at Accounts.callLoginMethod.userCallback (password_client.js:59)
    at accounts_client.js:195
    at underscore.js:750
    at loggedInAndDataReadyCallback (accounts_client.js:306)

If I go to the login form route directly and login, then I get directed to the home page as expected.