Extract secret from otpauth uri - #37
Conversation
9cd2f3b to
77b3ac9
Compare
|
Since this information comes from outside, a lot of checks are done to ensure that this is a valid URI. Should a less strict parsing be required in some contexts, a simple |
|
Setting to draft, I want to double-check that labels are mandatory |
|
Thank you @samueltardieu! I am starting to wonder if it should be part of this library, as we mostly concern ourselves with generating TOTPs... |
|
Yes, it is mandatory. |
My use case was to programatically access a service for which I had to enter a TOTP. I could indeed use this version in my own service, or release an extra library, since all the functions from NimbleTOTP that are used inside are public. As you wish. |
|
Hi @samueltardieu! Thank you for the contributions but yes, I think this is a bit outside of NimbleTOTP for now. I appreciate the time and you sharing the code with us though. ❤️ |
This extracts the secret from an
otpauth://URI.