Skip to content

Commit

Permalink
Add url_options param to sign_in email (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaskundig authored Feb 15, 2024
1 parent d69f28b commit 09ed492
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/mailers/passwordless/mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ class Mailer < Passwordless.config.parent_mailer.constantize
# @param session [Session] An instance of Passwordless::Session
# @param token [String] The token in plaintext. Falls back to `session.token` hoping it
# is still in memory (optional)
def sign_in(session, token = nil)
def sign_in(session, token = nil, url_options = {})
@token = token || session.token

@magic_link = Passwordless.context.url_for(
session,
action: "confirm",
id: session.to_param,
token: @token,
**url_options,
**default_url_options
)

Expand Down

0 comments on commit 09ed492

Please sign in to comment.