diff --git a/documentation/tutorials/getting-started-with-authentication.md b/documentation/tutorials/getting-started-with-authentication.md index 4f56cf0..d696f5c 100644 --- a/documentation/tutorials/getting-started-with-authentication.md +++ b/documentation/tutorials/getting-started-with-authentication.md @@ -175,6 +175,8 @@ defmodule MyApp.Accounts.User do authentication do api MyApp.Accounts + select_for_senders [:email] + strategies do password :password do identity_field :email diff --git a/lib/ash_authentication/dsl.ex b/lib/ash_authentication/dsl.ex index f107798..c27a1fb 100644 --- a/lib/ash_authentication/dsl.ex +++ b/lib/ash_authentication/dsl.ex @@ -104,7 +104,7 @@ defmodule AshAuthentication.Dsl do """, default: :get_by_subject ], - select_fields_for_senders: [ + select_for_senders: [ type: {:list, :atom}, doc: """ Ensures that fields required by your senders are selected when they are called diff --git a/lib/ash_authentication/strategies/password/request_password_reset_preparation.ex b/lib/ash_authentication/strategies/password/request_password_reset_preparation.ex index f8ef49d..db72cb0 100644 --- a/lib/ash_authentication/strategies/password/request_password_reset_preparation.ex +++ b/lib/ash_authentication/strategies/password/request_password_reset_preparation.ex @@ -25,7 +25,7 @@ defmodule AshAuthentication.Strategy.Password.RequestPasswordResetPreparation do query |> Query.filter(ref(^identity_field) == ^identity) - |> Query.ensure_selected(Info.authentication_select_fields_for_senders(query.resource)) + |> Query.ensure_selected(Info.authentication_select_for_senders(query.resource)) |> Query.after_action(&after_action(&1, &2, strategy)) else query