From 395388f91eb9de4688487f2866b2809d525c10a1 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Fri, 9 Dec 2022 00:51:10 +0400 Subject: [PATCH] chore(docs): Fix code examples in the documentation (#74) * Fix typo * Password strategy requires a name * Update documentation/getting_started/getting_started_01_basic_setup.md Co-authored-by: James Harton <59449+jimsynz@users.noreply.github.com> Co-authored-by: James Harton <59449+jimsynz@users.noreply.github.com> --- .../getting_started/getting_started_01_basic_setup.md | 5 ++++- lib/ash_authentication/strategies/password.ex | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/documentation/getting_started/getting_started_01_basic_setup.md b/documentation/getting_started/getting_started_01_basic_setup.md index f7ccdbb..2dd2287 100644 --- a/documentation/getting_started/getting_started_01_basic_setup.md +++ b/documentation/getting_started/getting_started_01_basic_setup.md @@ -157,12 +157,15 @@ defmodule MyApp.Accounts.User do api MyApp.Accounts strategies do - password :identity_field :email + password :password do + identity_field :email + end end tokens do enabled? true token_resource MyApp.Accounts.Token + do end postgres do diff --git a/lib/ash_authentication/strategies/password.ex b/lib/ash_authentication/strategies/password.ex index 6ab2bd6..eafac3c 100644 --- a/lib/ash_authentication/strategies/password.ex +++ b/lib/ash_authentication/strategies/password.ex @@ -30,7 +30,7 @@ defmodule AshAuthentication.Strategy.Password do api MyApp.Accounts strategies do - password do + password :password do identity_field :email hashed_password_field :hashed_password end