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

Uninitialized constant Users error for expired links #3

Closed
adrienpoly opened this issue Apr 26, 2021 · 6 comments
Closed

Uninitialized constant Users error for expired links #3

adrienpoly opened this issue Apr 26, 2021 · 6 comments

Comments

@adrienpoly
Copy link

Hello

Thanks for this great Gem.

For an expired link I am seeing a strange error that I have hard time understanding how to fix it.

The error happens in the call to warden

self.resource = warden.authenticate!(auth_options)

Capture d’écran 2021-04-26 à 7 27 00 AM

I tried this but still getting the same error

  def show
    self.resource = warden.authenticate!(auth_options)
    set_flash_message!(:notice, :signed_in)
    sign_in(resource_name, resource)
    yield resource if block_given?
    redirect_to after_sign_in_path_for(resource)
  rescue
    flash[:notice] = t("devise.failure.user.magic_link_invalid")
    redirect_to root_path
  end
@abevoelker
Copy link
Owner

abevoelker commented Apr 26, 2021 via email

@adrienpoly
Copy link
Author

sure the project is open source here https://github.com/hostolab/covidliste/blob/master/config/routes.rb

Lots of the issues and PR etc are in french but the code is all in English 😄

@abevoelker
Copy link
Owner

@adrienpoly Thank you very much for reporting; I believe this is a bug in my gem with certain routes not being calculated correctly. I've opened a PR on your project you can review to see if it fixes your issue: hostolab/covidliste#587

I am going to push an update to this project's generators to match the PR change so others won't encounter this problem.

Thanks for finding this!

@adrienpoly
Copy link
Author

This is awesome, thanks for your quick answer 🚀

@adrienpoly
Copy link
Author

I can confirm that it fixed the issue on our side thanks

@abevoelker
Copy link
Owner

Great, thanks for letting me know! I've released 0.6 version of the gem with a fixed generator.

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

2 participants