# `AshAuthentication.Strategy.Custom.Helpers`
[🔗](https://github.com/team-alembic/ash_authentication/blob/main/lib/ash_authentication/strategies/custom/helpers.ex#L5)

Helpers for use within custom strategies.

# `put_add_on`

```elixir
@spec put_add_on(dsl_state, AshAuthentication.Strategy.Custom.strategy()) :: dsl_state
when dsl_state: map()
```

Update the add-on in the DSL state by name.

This helper should only be used within transformers.

# `put_strategy`

```elixir
@spec put_strategy(dsl_state, AshAuthentication.Strategy.Custom.strategy()) ::
  dsl_state
when dsl_state: map()
```

Update the strategy in the DSL state by name.

This helper should only be used within transformers.

# `register_strategy_actions`

```elixir
@spec register_strategy_actions(
  action_or_actions,
  dsl_state,
  AshAuthentication.Strategy.Custom.strategy()
) :: dsl_state
when dsl_state: map(), action_or_actions: atom() | [atom()]
```

If there's any chance that an implementor may try and use actions genrated by
your strategy programatically then you should register your actions with Ash
Authentication so that it can find the appropriate strategy when needed.

The strategy can be retrieved again by calling
`AshAuthentication.Info.strategy_for_action/2`.

This helper should only be used within transformers.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
