mix ash_authentication.add_strategy.totp (ash_authentication v5.0.0-rc.7)

Copy Markdown View Source

Adds TOTP authentication to your user resource

TOTP can be used in two modes:

  • 2fa - As a second factor after password authentication (default)
  • primary - As the primary authentication method (passwordless)

Both modes use an audit log add-on for brute force protection, which will be created automatically if one doesn't already exist.

Example

mix ash_authentication.add_strategy.totp --mode 2fa

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
  • --mode, -m - Either primary or 2fa. Defaults to 2fa.
  • --name, -n - The name of the TOTP strategy. Defaults to totp.

Summary

Functions

igniter(igniter)

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