MagicAuth.OneTimePassword (magic_auth v0.2.0)

Ecto schema representing one-time passwords.

This module defines the data structure for one-time passwords, including the user's email and the encrypted password. It also provides functions to generate one-time passwords and to create changesets for data validation.

The one-time password is generated based on the length configuration defined in MagicAuth.Config.one_time_password_length(). The password is composed only of numeric digits and is generated randomly using a strong random number generator.

Summary

Functions

changeset(one_time_password, attrs)

email_pattern()

generate_code()