Skip to content

implement a method for TOTP that verifies and returns the matching timecode#191

Merged
kislyuk merged 1 commit into
pyauth:mainfrom
jap:return-timestamp
Jun 28, 2026
Merged

implement a method for TOTP that verifies and returns the matching timecode#191
kislyuk merged 1 commit into
pyauth:mainfrom
jap:return-timestamp

Conversation

@jap

@jap jap commented Jun 26, 2026

Copy link
Copy Markdown

This contains the part of #184 that implements a method verify_and_return_timecode for TOTP.

As its name suggests, this method verifies the given OTP, and if it matches, it will return the matching timecode.

This can be used to prevent replay attacks, by storing the timecode on successful authentication, and ensuring that it always increases.

@jap
jap force-pushed the return-timestamp branch 2 times, most recently from cbf6c8d to bc24cdc Compare June 26, 2026 14:52
@jap jap mentioned this pull request Jun 26, 2026
@jap
jap force-pushed the return-timestamp branch from bc24cdc to 7553de0 Compare June 26, 2026 14:55
@kislyuk
kislyuk merged commit 1c7cd77 into pyauth:main Jun 28, 2026
@kislyuk

kislyuk commented Jun 28, 2026

Copy link
Copy Markdown
Member

Looks useful. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants