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

Modify flow to add Paste in Token as default #159

Merged
merged 14 commits into from
Sep 7, 2023
Prev Previous commit
Next Next commit
Format
  • Loading branch information
mikker committed Sep 7, 2023
commit e62188042a3482f1e169ccd9965b9174d780a222
3 changes: 1 addition & 2 deletions app/mailers/passwordless/mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ class Mailer < Passwordless.config.parent_mailer.constantize
# is still in memory (optional)
def sign_in(session, token = nil)
@token = token || session.token

@magic_link = send(:"confirm_#{session.authenticatable_type.tableize}_sign_in_url", session, token)

email_field = session.authenticatable.class.passwordless_email_field

mail(
to: session.authenticatable.send(email_field),
subject: I18n.t("passwordless.mailer.sign_in.subject")
Expand Down