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

Unknown email sender config #225

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Remove whitespace. Revert schema update
  • Loading branch information
Dakota-Schramm committed May 3, 2024
commit 58268055549372b18a7df49975206ad9c46306ff
4 changes: 2 additions & 2 deletions app/controllers/passwordless/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def normalized_email_param
def handle_resource_not_found
if Passwordless.config.paranoid
@resource = authenticatable_class.new(email: normalized_email_param)
@skip_after_session_save_callback = true
@skip_after_session_save_callback = true
else
raise(
ActiveRecord::RecordNotFound,
Expand All @@ -215,7 +215,7 @@ def handle_resource_not_found
def call_after_session_save
if @skip_after_session_save_callback
if Passwordless.config.send_paranoid_email
Mailer.unknown_address(@session).deliver_now
Mailer.unknown_address(@session).deliver_now
end
elsif Passwordless.config.after_session_save.arity == 2
Passwordless.config.after_session_save.call(@session, request)
Expand Down
4 changes: 2 additions & 2 deletions test/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
t.datetime "claimed_at", precision: nil
t.string "token_digest", null: false
t.string "identifier", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["authenticatable_type", "authenticatable_id"], name: "authenticatable"
t.index ["identifier"], name: "index_passwordless_sessions_on_identifier", unique: true
end
Expand Down