mirror of
https://github.com/team-alembic/ash_authentication.git
synced 2024-09-20 05:13:10 +12:00
docs: improve getting started guides (#140)
This commit is contained in:
parent
bc42cc7396
commit
a5a1c2cdc3
2 changed files with 24 additions and 2 deletions
|
@ -20,6 +20,17 @@ defp deps()
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
And add `ash_authentication` to your `.formatter.exs`:
|
||||||
|
|
||||||
|
```elixir
|
||||||
|
# .formatter.exs
|
||||||
|
|
||||||
|
[
|
||||||
|
# ...
|
||||||
|
import_deps: [:ash_authentication]
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
## Choosing your extensions, strategies and add-ons
|
## Choosing your extensions, strategies and add-ons
|
||||||
|
|
||||||
Ash Authentication supports many different features, each configured separately.
|
Ash Authentication supports many different features, each configured separately.
|
||||||
|
@ -154,7 +165,7 @@ defmodule MyApp.Accounts.User do
|
||||||
attributes do
|
attributes do
|
||||||
uuid_primary_key :id
|
uuid_primary_key :id
|
||||||
attribute :email, :ci_string, allow_nil?: false
|
attribute :email, :ci_string, allow_nil?: false
|
||||||
attribute :hashed_password, :string, allow_nil?: false
|
attribute :hashed_password, :string, allow_nil?: false, sensitive?: true
|
||||||
end
|
end
|
||||||
|
|
||||||
authentication do
|
authentication do
|
||||||
|
@ -172,7 +183,7 @@ defmodule MyApp.Accounts.User do
|
||||||
signing_secret fn _, _ ->
|
signing_secret fn _, _ ->
|
||||||
Application.fetch_env(:my_app, :token_signing_secret)
|
Application.fetch_env(:my_app, :token_signing_secret)
|
||||||
end
|
end
|
||||||
do
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
postgres do
|
postgres do
|
||||||
|
|
|
@ -28,6 +28,17 @@ end
|
||||||
Use `mix hex.info ash_authentication_phoenix` to quickly find the latest
|
Use `mix hex.info ash_authentication_phoenix` to quickly find the latest
|
||||||
version.
|
version.
|
||||||
|
|
||||||
|
Add `ash_authentication_phoenix` to your `.formatter.exs`:
|
||||||
|
|
||||||
|
```elixir
|
||||||
|
# .formatter.exs
|
||||||
|
|
||||||
|
[
|
||||||
|
# ...
|
||||||
|
import_deps: [:ash_authentication_phoenix]
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
## {{link:ash_authentication_phoenix:module:AshAuthentication.Phoenix.Router}}
|
## {{link:ash_authentication_phoenix:module:AshAuthentication.Phoenix.Router}}
|
||||||
|
|
||||||
`ash_authentication_phoenix` includes several helper macros which can generate
|
`ash_authentication_phoenix` includes several helper macros which can generate
|
||||||
|
|
Loading…
Reference in a new issue