Is there a way to generate scratch codes? Readme.md and manual PDF doesn't say how.
tommai78101 opened this issue · comments
I understand that the library can generate 5 scratch codes upon generating the shared key. However, it doesn't explain where or how to obtain said scratch codes. I even checked the manual.
I would like to know how to generate those scratch codes via this library, so that they would still have the ability to log back in? Thanks.
Ugh, I finally understood how to generate the scratch codes now. Gotta read a section further down than I thought in the manual.
- You need to create a
GoogleAuthenticatorConfigBuilder
and tell it to create X number of scratch codes. - Then, once you obtained the
GoogleAuthenticatorKey
, it will produce a list of those scratch codes in that class.