mirror of
https://github.com/team-alembic/ash_authentication.git
synced 2024-09-19 12:52:55 +12:00
fix: only pass the "token" parameter to reset with token action (#748)
This commit is contained in:
parent
f6c2ae6267
commit
a79a474b11
2 changed files with 2 additions and 2 deletions
|
@ -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]} ->
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue