otp
RFC6238 Time-Based One-Time Password / Google Authenticator Library
3.2.0
104K downloads/mo
#1108 most downloaded on pub.dev
Daegalus/dart-otp
What this package is like to depend on
Last release 1 years ago
07 Aug 2025
Ships unpredictably
gaps range from 2 weeks to 2.3 years
Nearly every release is documented
notes for 28 of 29 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
30 releases · first in 2013
0 releases in the last 12 months
see the full history below
Release timeline
30 releases · Mar 2013 to Aug 2025
2014
2016
2018
2020
2022
2024
2026
Releases
latest 30-
3.2.007 Aug 2025Release notes
Open source →v3.2.0
- Update timezone to 0.10.0 (Thanks @NM4ik)
- Some minor cleanup for how long this repo has been untouched
What's Changed
New Contributors
Full Changelog: 3.1.4...3.2.0
-
3.1.406 Apr 2023Release notes
Open source →What's Changed
- Allow lowercase base32 strings if isGoogle is set to true by @amadejkastelic in #46
Full Changelog: v3.1.2...3.1.4
-
3.1.312 Nov 2022 -
3.1.212 Nov 2022 -
3.1.123 Jun 2022Release notes
Open source →- Loosen version constraint on the
cryptoso that there is no conflict between our library and those requiring 3.0.1 or 3.0.0.cryptoversions 3.0.1 and 3.0.2 don't affect this library or are just doc/link fixes.
Release notes
Open source →- Loosen version constraint on the
cryptoso that there is no conflict between our library and those requiring 3.0.1 or 3.0.0.cryptoversions 3.0.1 and 3.0.2 don't affect this library or are just doc/link fixes.
- Loosen version constraint on the
-
3.1.016 Jun 2022Release notes
Open source →- Bug where all secrets were being treated as Base32 by default, when RFC default is ASCII. Base32 is only when using Google Authenticator mode. This came about due to even when not using Google, secrets were Base32 encoded anyway by most implementations, so the bug wasn't caught, including my tests where I pre-encoded everything as Base32. (thanks @pt-rick for catching this.)
- Used
notpandotplibto verify my outputs.
- Used
Release notes
Open source →- Bug where all secrets were being treated as Base32 by default, when RFC default is ASCII. Base32 is only when using Google Authenticator mode. This came about due to even when not using Google, secrets were Base32 encoded anyway by most implementations, so the bug wasn't caught, including my tests where I pre-encoded everything as Base32. (thanks @pt-rick for catching this.)
- Used
notpandotplibto verify my outputs.
- Used
- Bug where all secrets were being treated as Base32 by default, when RFC default is ASCII. Base32 is only when using Google Authenticator mode. This came about due to even when not using Google, secrets were Base32 encoded anyway by most implementations, so the bug wasn't caught, including my tests where I pre-encoded everything as Base32. (thanks @pt-rick for catching this.)
-
3.0.421 May 2022Release notes
Open source →- Partially change behavior, if it is invalid Base32, it should throw, but in certain cases, it still doesn't throw, so we do fallback behavior.
Release notes
Open source →- Partially change behavior, if it is invalid Base32, it should throw, but in certain cases, it still doesn't throw, so we do fallback behavior.
-
3.0.321 May 2022Release notes
Open source →- Fix when secrets are not Base32 causing infinite loops because the resulting list is size 0.
- Don't assume Base32, use the secret as is if not base32.
-
3.0.203 Jan 2022Release notes
Open source →- Add
remainingSeconds()in order to calculate the remaining seconds based onlastUsedTime. (thanks @AkbarAsghari)
- Add
-
3.0.118 Aug 2021Release notes
Open source →- Add
lastUsedTimeandlastUsedCounterto provide additional information for users and potential debugging points.
- Add
-
3.0.030 May 2021 -
3.0.0-nullsafety.001 Feb 2021 pre-release -
2.2.328 Aug 2020Release notes
Open source →- Improve pub package score (thanks @DavBfr)
- Use const and final instead of var (thanks @DavBfr)
- Document public API members (thanks @DavBfr)
-
2.2.226 Aug 2020 -
2.2.118 May 2020Release notes
Open source →- Correctly use Google Auth flag (
isGoogle) to disable padding. (thanks hpoul)
- Correctly use Google Auth flag (
-
2.2.003 May 2020Release notes
Open source →- Add Google Auth flag, because they do SHA1 TOTP without Padding the secret.
- Reverting _int2bytes function back to old implementation, as the new on uses int64 which breaks flutter web and dart2js as it doesn't have support for Int64.
-
2.1.001 Apr 2020Release notes
Open source →- Fix secret paddding to follow proper TOTP secret padding and sizing for SHA256, SHA512
- Remove RFC unsupported hashes. SHA224 and SHA384 are no longer supported.
- Show warning when using anything other than SHA1, as the RFC doesn't support it so I have found that libraries don't pad correctly for HOTP.
- At the same time, SHA1 is now again the HOTP default.
- Add optional TOTP style paddding for HOTP when using SHA256 and SHA512.
- Force version 1.1.1 of Base32 library, as that was a major bug fix release that improved Base32 support.
- Add documentation and additional information on how to use this library.
-
2.0.318 Dec 2019Release notes
Open source →- Fix type error at runtime for RandomSecret generation. MR #14 (thanks readytopark)
-
2.0.220 Nov 2019 -
2.0.114 Nov 2019Release notes
Open source →- Formatting
- No changes from rc1, accepting the 1-3 second timing difference between constant time code checks until someone can help me figure out how to make it match.
-
2.0.014 Nov 2019Nothing published for this version
-
1.0.307 Mar 2019Release notes
Open source →- Switched to PointyCastle for crypto and support for more than SHA1 hashing for tokens (amadejkastelic)
-
1.0.206 Feb 2019 -
1.0.107 Aug 2018 -
1.0.007 Aug 2018 -
0.1.009 Nov 2013 -
0.0.405 Jun 2013 -
0.0.311 Apr 2013 -
0.0.204 Mar 2013Release notes
Open source →- No functionality changes, just fixing a bad file state it git and in the package involving the case of the file.
-
0.0.103 Mar 2013