fix: only pass the "token" parameter to reset with token action (#748)

This commit is contained in:
Zach Daniel 2024-07-22 15:44:36 -04:00 committed by GitHub
parent f6c2ae6267
commit a79a474b11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -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]} ->

View file

@ -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