mikker / passwordless

🗝 Authentication for your Rails app without the icky-ness of passwords
MIT License
1.26k stars 85 forks source link

troubles upgrading to 1.0.0 #168

Closed yshmarov closed 9 months ago

yshmarov commented 10 months ago

first of all, congrats on releasing 1.0.0! 🥳 I really love the new "token input" form.

I just tried upgrading my app to 1.0.0, and faced a few challenges:

Now, passwordless_for :users, at: '/', as: :auth generates:

Screenshot 2023-10-15 at 13 52 02

(it loses the _)

I remove the as: :auth, and change it to passwordless_for :users, at: '/'. Now the routes look like this:

Screenshot 2023-10-15 at 13 53 07

However now the tests are failing on passwordless_sign_in(@user):

Screenshot 2023-10-15 at 13 53 54
mikker commented 10 months ago

Thank you! This sounds like a genuine bug. I'll look into it when I have a little time to spare

jpatters commented 10 months ago

I am experiencing these issues as well. The fix for the paths missing the _ is easy enough (happy to submit a pr). However if you set as: to something other than :users it still generates the urls with users in them. This seems to be a deeper rooted issue. So as far as I can tell, as: just doesn't work.

mikker commented 10 months ago

Made a PR. I think it'll fix your problems. If you can, please give it a go and let me know if it fixes your problems.