You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AccountsTemplates.submitCallback adds a Meteor.setTimeout function for a few routes.
In that setTimeout AccountsTemplates.postSubmitRedirect(state); handles re-directing.
It seems that submitting a reset password can cause the routes onBeforeAction to re-run prior to the timeout firing. In the onBeforeAction AccountsTemplates.setState(route); is called. This setState refers to At.prototype.setState in useraccounts core. That function calls this.clearState intending to refer to At.prototype.clearState but because AccountsTemplate.clearState is already defined in iron-routing/client.js it overrides the this.clearState that the function meant to call. Calling. AccountsTemplate.clearState clears the AccountsTemplates.timedOutRedirect handle causing the code in the setTimeout to never run.
Changing onBeforeAction to an onRun is probably all that is really needed but may want to handle the unintentional overriding of the prototype method too.
The text was updated successfully, but these errors were encountered:
funkyeah
changed the title
postSubmitRedirect does not work properly for resetPwd state
postSubmitRedirect does not get called when in resetPwd state
Feb 21, 2016
The
AccountsTemplates.submitCallback
adds a Meteor.setTimeout function for a few routes.In that setTimeout
AccountsTemplates.postSubmitRedirect(state);
handles re-directing.It seems that submitting a reset password can cause the routes onBeforeAction to re-run prior to the timeout firing. In the onBeforeAction
AccountsTemplates.setState(route);
is called. This setState refers to At.prototype.setState in useraccounts core. That function calls this.clearState intending to refer to At.prototype.clearState but becauseAccountsTemplate.clearState
is already defined in iron-routing/client.js it overrides the this.clearState that the function meant to call. Calling.AccountsTemplate.clearState
clears the AccountsTemplates.timedOutRedirect handle causing the code in the setTimeout to never run.Changing onBeforeAction to an onRun is probably all that is really needed but may want to handle the unintentional overriding of the prototype method too.
The text was updated successfully, but these errors were encountered: