Skip to content

Commit 3a041ad

Browse files
committed
TOTP period is 30 seconds
Google Authenticator uses a period of 30 seconds instead of 60.
1 parent 4413731 commit 3a041ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qrcode_demo.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ get_pixels0(<<>>, Acc) ->
100100
%%
101101
totp() ->
102102
Key = crypto:sha(<<"password">>),
103-
totp(Key, 60).
103+
totp(Key, 30).
104104
totp(Key, Period) ->
105105
T = unow() div Period,
106106
{hotp(Key, T - 1), hotp(Key, T), hotp(Key, T + 1)}.

0 commit comments

Comments
 (0)