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

Accounts-ui (ResetPassword, EnrollmentEmail modal) not works #315

Closed
elbowz opened this issue Nov 29, 2013 · 13 comments
Closed

Accounts-ui (ResetPassword, EnrollmentEmail modal) not works #315

elbowz opened this issue Nov 29, 2013 · 13 comments

Comments

@elbowz
Copy link

elbowz commented Nov 29, 2013

Sorry if this is a duplicate of #3, but I haven't found a solution and iron-router don't wants work.

When i click on ResetPassword link (http://localhost:3000/#/reset-password/:token) meteor redirect on '/'.

This issue is not resolved?
I have seen some workaround, but i have to rewrite from scratch my template for manage ResetPassword, EnrollmentEmail, etc.

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

this.route('resetPassword', {
        path: '/reset-password/:token',
        action: function() {
            Accounts.resetPassword(this.params.token, prompt('enter new password'), function () {
                Router.go('/');
            });
        }
    });

How can I use the template defined in account-ui (_forgotPasswordForm)?

thanks in advance

@DenisGorbachev
Copy link

+1

1 similar comment
@wsoul
Copy link

wsoul commented Dec 3, 2013

👍

@tmeasday
Copy link
Contributor

Ok, I'm not totally across the original issue, but it works for me: https://github.com/tmeasday/iron-router-accounts-ui

If you can make a similarly simple reproduction of it failing, that'd be appreciated.

@elbowz
Copy link
Author

elbowz commented Dec 11, 2013

I have lost 2 hours for understand because your example worked...also for me.

At the end I have failed...

I have recreate a new meteor project, add all packages as original one, add to it all source files...and tadaa all works good?!?!

thank for your support, but I don't know how but my meteor project was "wasted"

@pfafman
Copy link

pfafman commented Dec 11, 2013

So I was having this same issue today and also just made a simple meteor app that worked. So was also confused.
To make matters worse I am using the bootstrap 3 stuff....

I fixed it by doing the flowing

Removed all the relevant packages (note that the bootstrap-less-3 is my own local branch of bootstrap 3 in less for meteor)

meteor remove accounts-password
mrt remove accounts-ui-bootstrap-3
mrt remove bootstrap-less-3
mrt remove iron-router

Add them back in with Iron router added in last

meteor add accounts-password
mrt add bootstrap-less-3
mrt add accounts-ui-bootstrap-3
met add  iron-router

Then the links started working.
I assume the trick is to add iron-router after accounts-ui.

I have not looked but I would imagine there is some javascript override magic that has to set the iron router calls after the meteor internal routing calls that get set up by the accounts-ui packages. If that happens in the wrong order all hell breaks loose.

@pfafman
Copy link

pfafman commented Dec 11, 2013

So played with this a little more by editing
.meteor/packages. If 'iron-router' is listed before 'accounts-password' the accounts urls will fail and just show the homepage. If it is listed the other way then they work.

In .meteor/packages. This works:

  ...
accounts-password
iron-router
  ...

This does not:

  ...
iron-router
accounts-password
  ...

@elbowz
Copy link
Author

elbowz commented Dec 12, 2013

yeah, It's the same for me!

thanks for the your explanation

@tmeasday
Copy link
Contributor

Ok, I think I fixed this on dev already with ff27432

Can you try with your real projects on the dev branch and see if it fixes the issue?

@pfafman
Copy link

pfafman commented Dec 14, 2013

So I just checked this against both the sample app and my real app and it works in both regardless of where iron-router is in the .packages file. So I think this fixed worked

@ryw ryw closed this as completed Feb 16, 2014
@katopz
Copy link

katopz commented Sep 3, 2015

Hm, It's 2015 and I still stuck at this http://localhost:3000/#/reset-password , plenty of comment is deprecated and I'm doom.

Any update against current Meteor todos example version please give me a hint. Thanks

@stinghz
Copy link

stinghz commented Jun 12, 2016

I'm having this issue too after upgrading to Meteor 1.3 , I'm getting url like ,
http://localhost:3000/#/reset-password/xxxxx
http://localhost:3000/#/verify-email/xxxxxx

Any idea of how to fix it is grealy appreciated! Thanks
I'm using flow-router

@csms0726
Copy link

me too +1

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

9 participants