Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having trouble with ensureSignedIn #2

Closed
dovrosenberg opened this issue Aug 9, 2015 · 6 comments
Closed

Having trouble with ensureSignedIn #2

dovrosenberg opened this issue Aug 9, 2015 · 6 comments

Comments

@dovrosenberg
Copy link

Thanks for the all the work on this.

I've got everything working great if I don't filter out logged out users. All the sign-in, reset password, etc. templates get created and route correctly. But as soon as I do:

FlowRouter.triggers.enter([AccountsTemplates.ensureSignedIn]);

it all stops working.

All the routes are properly redirected to sign-in, and I can see the redirect being called, but the rendering code here never gets called, nor does the route-specific trigger

Any ideas?

@PhilippSpo
Copy link
Member

I guess there is a infinit redirect loop happening.
I have it set up like this:

FlowRouter.triggers.enter([AccountsTemplates.ensureSignedIn], {
    except: [ 'signIn', 'signUp', 'forgotPwd',
        'resetPwd',
        'verifyEmail', 'resendVerificationEmail'
    ]
});

@jshimko
Copy link
Member

jshimko commented Aug 10, 2015

Oops. I fixed that, but apparently never committed/pushed it. I'm running the development version locally, so it was working fine for me. Sorry about that guys.

The ensureSignedIn helper now checks to make sure you're not already on an AccountsTemplates route before redirecting.

Now we just need @splendido to push that up to Atmosphere when he has a moment! :)

@splendido
Copy link
Member

this would mean bump all useraccounts packages to 1.12.1 :(
Do you think it's fine to do it right now?

@100ideas
Copy link
Contributor

Might be the cause of this bug reported over in meteor-useraccounts/boilerplates#13

@jshimko
Copy link
Member

jshimko commented Aug 11, 2015

The issue mentioned at meteor-useraccounts/boilerplates#13 has been resolved (you can read the details in my comment there).

@splendido, as far as I can tell, this should be good to go now. I've tested everything I can think of and it's all working. Default routes, custom routes with custom options, etc. Everything behaves as it should. Sorry for the republish inconvenience.

@splendido
Copy link
Member

Bumping now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants