mix ash_authentication.add_strategy (ash_authentication v4.9.4)

View Source

Adds the provided strategy or strategies to your user resource

This task will add the provided strategy or strategies to your user resource.

The following strategies are available. For all others, see the relevant documentation for setup

  • password - Register and sign in with a username/email and a password.
  • magic_link - Register and sign in with a magic link, sent via email to the user.
  • api_key - Sign in with an API key.

Example

mix ash_authentication.add_strategy password

Global options

  • --user, -u - The user resource. Defaults to YourApp.Accounts.User
  • --identity-field, -i - The field on the user resource that will be used to identify the user. Defaults to email

Password options

  • hash_provider - The hash provider to use, either bcrypt or argon2. Defaults to bcrypt2.

Summary

Functions

igniter(igniter)

Callback implementation for Igniter.Mix.Task.igniter/1.