Skip to content

Commit

Permalink
fix: only pass the "token" parameter to reset with token action
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Jul 19, 2024
1 parent f6c2ae6 commit 2eca472
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ash_authentication/strategies/password/actions.ex
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ defmodule AshAuthentication.Strategy.Password.Actions do
strategy.resource
|> Query.new()
|> Query.set_context(%{private: %{ash_authentication?: true}})
|> Query.for_read(strategy.sign_in_with_token_action_name, params)
|> Query.for_read(strategy.sign_in_with_token_action_name, %{"token" => params["token"]})
|> Ash.read(options)
|> case do
{:ok, [user]} ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ defmodule AshAuthentication.Strategy.Password.ActionsTest do

log =
capture_log(fn ->
assert :ok = Actions.reset_request(strategy, %{"username" => user.username()}, [])
assert :ok = Actions.reset_request(strategy, %{"username" => user.username}, [])
end)

assert log =~ ~r/password reset request for user #{user.username}/i
Expand Down

0 comments on commit 2eca472

Please sign in to comment.