Elixir2fa v0.1.0 Elixir2fa View Source
Documentation for Elixir2fa.
Link to this section Summary
Functions
Return the QR image url thanks to Google. This can be shown to the user and scanned by the authenticator program as an easy way to enter the secret.
Generate Time-Based One-Time Password. The default period used to calculate the moving factor is 30s
Generate random_secret for TOTP, by default random_secret need 16 length of alphabet
Link to this section Functions
Link to this function
generate_qr(name, secret) View Source
Return the QR image url thanks to Google. This can be shown to the user and scanned by the authenticator program as an easy way to enter the secret.
- name: Name of the key that you want to show up in the users authentication application. Should already be URL encoded.
- secret: Secret string that will be used when generating the current number.
Link to this function
generate_totp(secret, period \\ 30) View Source
Generate Time-Based One-Time Password. The default period used to calculate the moving factor is 30s
Link to this function
random_secret(length \\ 16) View Source
Generate random_secret for TOTP, by default random_secret need 16 length of alphabet