This seems like a great solution Would you be able to point me to a code sample? Specifically, Iâm not clear on how to put the original path into a query property.
Check out what returns from FlowRouter.current(), the query parameters are probably accessible there. Then, you can pass it to FlowRouter.go() or FlowRouter.path()
I do not see this behavior in our production Meteor app. For us, Accounts.onLogin is only called once. We use Blaze + FlowRouter.
Perhaps this is an issue with React + FlowRouter + Accounts.onLogin? Iâd try isolating it down to the simplest app that reproduces the behavior. Ideally you could reuse the same app logic and show the behavior in two identical apps but one running Blaze and one running React.
@alanning I followed your advice and you are correct it does not occur every time. Now all I have to figure out is what is causing Accounts.onLogin to be called in my production app but at least I know the issue is on my end. Thx!
Cool. Glad you got it isolated. I saw the repro you linked before but it wasnât minimal (since it had some other things going on like the redirect) so I figured a simpler one may help debug.
One thing that may help is making Accounts.onLogin throw after the 2nd call or so. That way you can walk back the stack trace and maybe see whatâs triggering it.
Just a guess but it may be tied to private browsing and/or localStorage and cookies not being writable for storing the login token.