Skip to content

Commit

Permalink
Clarify period usage, closes #26
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jun 21, 2024
1 parent d438671 commit 09477a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/nimble_totp.ex
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ defmodule NimbleTOTP do
* `:time` - The time (either `t:NaiveDateTime.t/0`, `t:DateTime.t/0`, or Unix format
*in seconds*) to be used. Default is `System.os_time(:second)`.
* `:period` - The period (in seconds) in which the code is valid. Default is `30`.
If this option is given to `verification_code/2`, it must also be given to `valid?/3`.
## Examples
Expand Down Expand Up @@ -207,6 +208,7 @@ defmodule NimbleTOTP do
* `:since` - The last time the secret was used, see "Preventing TOTP code reuse" next.
Same possible types as the `:time` option.
* `:period` - The period (in seconds) in which the code is valid. Default is `30`.
If this option is given to `verification_code/2`, it must also be given to `valid?/3`.
## Preventing TOTP code reuse
Expand Down

0 comments on commit 09477a9

Please sign in to comment.