Question

Looking at the source code of url_client.js it clearly states that

    // reset password urls use hash fragments instead of url paths/query
    // strings so that the reset password token is not sent over the wire
    // on the http request

I am using mini-pages which doesn't use hash fragments in the url's and so my reset password token is never set.

I have a mini pages route set up to handle the following path : 'reset-password/:code'

match = window.location.hash.match(/^\#\/reset-password\/(.*)$/);

The hash match always returns null, what can i do to get the token ? I thought the token was stored in the database and shouldn't meteor validate against the database before setting the reset password token

The accounts-urls package defines helpers that look for the '#' in the front and my url is never caught for some reason.

  Accounts.urls.resetPassword = function (token) {
  return Meteor.absoluteUrl('#/reset-password/' + token);
};
Was it helpful?

Solution

For anyone wanting to know. This was caused by the html5history API package that comes with the meteor-router or mini-router meteorite packages. I removed them and the tokens are no longer null

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top