docs: Update getting-started-with-authentication.md (#244)

Add note for those using policies
This commit is contained in:
Frank Dugan III 2023-03-23 16:59:48 -05:00 committed by GitHub
parent 42be14d024
commit a7c296f21a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,6 +152,13 @@ defmodule MyApp.Accounts.Token do
table "tokens"
repo MyApp.Repo
end
# If using policies, add the following bypass:
# policies do
# bypass AshAuthentication.Checks.AshAuthenticationInteraction do
# authorize_if always()
# end
# end
end
```
@ -198,6 +205,13 @@ defmodule MyApp.Accounts.User do
identities do
identity :unique_email, [:email]
end
# If using policies, add the folowing bypass:
# policies do
# bypass AshAuthentication.Checks.AshAuthenticationInteraction do
# authorize_if always()
# end
# end
end
```