mirror of
https://github.com/team-alembic/ash_authentication_phoenix.git
synced 2024-09-20 13:34:26 +12:00
903f3a386e
As of version `3.10.5` `ash_authentication` now supports generating and validating short-lived sign in tokens as part of the password sign in flow. This feature seamlessly enables this flow simply by turning on `sign_in_tokens_enabled?` in the password strategy DSL. --------- Co-authored-by: James Harton <james@harton.nz>
14 lines
248 B
Elixir
14 lines
248 B
Elixir
defmodule Example.Accounts.Token do
|
|
@moduledoc false
|
|
use Ash.Resource,
|
|
data_layer: Ash.DataLayer.Ets,
|
|
extensions: [AshAuthentication.TokenResource]
|
|
|
|
token do
|
|
api Example.Accounts
|
|
end
|
|
|
|
actions do
|
|
defaults [:read]
|
|
end
|
|
end
|