Different forms to reset the password #207
Answered
by
janko
Halvanhelv
asked this question in
Q&A
-
Hi! i have a few questions but they are related, need advice/examples of solutions
I do not want to force an authenticated user to enter his login to reset, so I changed the standard form a bit and substituted the login myself <%= turbo_frame_tag "reset_password_button" do %>
<%= form_with url: rodauth.reset_password_request_path, method: :post, data: { turbo: false }, class: "w-full max-w-sm" do |form| %>
<%= form.hidden_field rodauth.login_param, value: current_user.email %>
<%= form.submit rodauth.reset_password_request_button %>
<% end %>
<% end %> is it ok to do this or is there a better solution?
Or maybe there is a completely different approach for this kind of task and it is worth redoing? reset_password_request_view {
rails_render(
turbo_stream: [
rails_controller_instance.turbo_stream.replace('reset_password_button', partial: 'profile/reset_password'),
rails_controller_instance.turbo_flashes
]
)
} |
Beta Was this translation helpful? Give feedback.
Answered by
janko
May 13, 2023
Replies: 1 comment 1 reply
-
Hello 👋🏻
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Halvanhelv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello 👋🏻
if param("source") == "profile"
in a configuration method block.