chore: give the select fields option a better name, add it to guide

This commit is contained in:
Zach Daniel 2023-01-27 18:30:42 -05:00
parent 71be815939
commit 40880b3e42
3 changed files with 4 additions and 2 deletions

View file

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

View file

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

View file

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