Replies: 3 comments 12 replies
-
Hi, it's not an obvious question at all 😉 The Action Mailer design is still something I'm iterating on, since there is no official recommendation in Rodauth itself on how best to background emails. I modified the # app/misc/rodauth_main.rb
class RodauthMain < Rodauth::Rails::Auth
configure do
# ...
end
def verify_account_email_token
token_param_value(verify_account_key_value)
end
end In your class RodauthMailer < ApplicationMailer
def verify_account(name, account_id, key)
@rodauth = rodauth(name, account_id) { @verify_account_key_value = key }
@email_link = "https://frontend.example.com/verify-account?token=#{@rodauth.verify_account_email_token}"
# ...
end
end Let me know if this works 😉 I think it would be useful to make the |
Beta Was this translation helpful? Give feedback.
-
This was helpful. I suppose if we wanted to verify other elements of the account, we would have to define the appropriate instance variable on For example, if a user changed their login, then we'd have to define Just want to make sure I understand, thanks! |
Beta Was this translation helpful? Give feedback.
-
I wanted to check back in. I have updated my application to use the reference mailer implementation (seen in the rails example app) as I ended up needing to modify more than just one mail link (initially, I was only concerned about account verify, but now I am working on password reset and login change). Thank you so much for your conversations here, I updated the implementation without any issues on the latest |
Beta Was this translation helpful? Give feedback.
-
Hello!
I'm trying to customise the format of the links sent by rodauth's mailer, and there are a few lines I can't find documentation on. Since I have a JSON API, I need to redirect all these links to custom pages I have made that do AJAX calls.
For the account verification, modification seems easy (simply replace rodauth.verify_account_url with a custom function)
however for the others, there is an "email_link" function that seems to seems to set instance variables on rodauth. How does this work, and how could I go about modifying the format?
Apologies if this is an obvious question.
Best regards,
Sebastian
Beta Was this translation helpful? Give feedback.
All reactions