-
Notifications
You must be signed in to change notification settings - Fork 40
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
Suggestion: introduce a way to control where the user is redirected to on invalid/expired token #46
Comments
I haven't tested this personally but I think you may be able to accomplish this by writing a custom |
If you only want to override the redirect for the expired magic link something like this might work class CustomFailure < Devise::FailureApp
def redirect_url
if warden_message == :magic_link_invalid
your_custom_path
else
super
end
end
# You need to override respond to eliminate recall
def respond
if http_auth?
http_auth
else
redirect
end
end
end |
@abevoelker I'm getting a |
I've solved by adding |
@jvortmann hey sorry you encountered that; something is wrong if you're getting that message. if you're able to share code that reproduces it i can dig in deeper to it |
Unfortunately I can't, but there is no client side code or configuration added from the default. We added as alternative to the password login.
And the route to create send the magic link is like:
The sending work just fine but if we let the link expire and try to access it, we got the error above unless we add the I see no code in the gem that edits the |
(Copying and pasting this to all open issues/PRs:) Hey all, per #64 I unfortunately won't have much time for the foreseeable future to maintain devise-passwordless to fix the open bugs and work on new features. I'm not abandoning this project, but due to some life issues it's just at the bottom of my priority list for now. Anyone who wants to step up and be a maintainer to shepherd the project forward would be welcomed! I just ask that you've opened a PR, or written an issue, or can otherwise demonstrate some familiarity/competence with the project. You can reply to #64 or message me privately (through email or socials since GitHub doesn't have DMs) if interested. Thank you ✌️ |
Hey :)
Unless I'm missing something this is currently non-trivial to do.
Use case example: If a user clicks an invalid/expired token, I want to send them back to the sign in page, with a flash message letting them know what happened.
The text was updated successfully, but these errors were encountered: