lynndylanhurley / redux-auth

Complete token authentication system for react + redux that supports isomorphic rendering.
Do What The F*ck You Want To Public License
2.13k stars 260 forks source link

Confirmation Success Url #78

Open jclif opened 8 years ago

jclif commented 8 years ago

Howdy!

I'm experiencing some issues with the confirmation flow. When I try to sign in as a new user, I am redirected back to the signup page but my app is throwing an error that I don't recognize. Has anyone encountered this particular issue?

Should I be setting the confirm_success_url within settings when I call configure?

The error I'm seeing is: TypeError: Cannot read property 'replace' of undefined

signup_error

jclif commented 8 years ago

I believe this might be related to #77.

jclif commented 8 years ago

@lynndylanhurley From what I can tell, the line:

value.replace(/[^+#$&/:<-\[\]-}]/g, encodeURIComponent)

fails when the variable called name is a string 'authHeaders' because value is undefined.

betoharres commented 8 years ago

it looks like the same problem as mine. Did you have this problem when trying to reset the password as well?

vijaychouhan-rails commented 8 years ago

Please set the config.action_mailer.default_url_options = { :host => 'https://localhost:3000' } in Rails application at development.rb

jclif commented 8 years ago

@vijaychouhan-rails I believe the rails server has the correct email url; it links me to my front-end application correctly.

jclif commented 8 years ago

@betoharres Yes, this happens on password change as well. What has been your solution to this? We would like to use this library for auth, but we are stuck because of these issues.

betoharres commented 7 years ago

@jclif Yeah, I did a PR 10 days ago fixing these problems, you can check it out my solution here, but it was not merged. I'm using this lib locally with my modifications. But the thing is: if you clone this repo right now in the master branch and run it's tests, it will show all green even with all these errors. When I fixed, I broke 24 tests but I fixed the problem and everything else works the same. If you know anything about the tests used in this lib, please help us out, it will be very welcome ❤️

jclif commented 7 years ago

@betoharres Interestingly, when I run these tests locally, they appear to pass without any problems.

betoharres commented 7 years ago

@jclif They do, that's the problem! haha