mirror of
https://github.com/team-alembic/ash_authentication.git
synced 2024-09-17 03:43:04 +12:00
chore: give the select fields option a better name, add it to guide
This commit is contained in:
parent
71be815939
commit
40880b3e42
3 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue