Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot reuse the secret #51

Closed
gadelkareem opened this issue May 5, 2020 · 4 comments
Closed

Cannot reuse the secret #51

gadelkareem opened this issue May 5, 2020 · 4 comments

Comments

@gadelkareem
Copy link

gadelkareem commented May 5, 2020

in https://github.com/pquerna/otp/blob/master/totp/totp.go#L183 the secret should not be re-encoded since that is the final seed we will store in the DB. To be able to reuse the seed to generate a new key we need to add it as a final secret.

@codenoid
Copy link

codenoid commented Nov 7, 2020

agree, we should let user handle this kind of problem, but what we gonna do ? (start /v2 ?), this already like this from beginning

@gadelkareem
Copy link
Author

V2 sounds like a good idea. Practically I noticed that most of the time you will create a new secret anyway. An easy fix would be decode the secret but might not be backward compatible.

@pquerna
Copy link
Owner

pquerna commented Nov 11, 2020

I'm confused about the gap here?

Generate(....) returns a *Key, which you can call .Secret() on?

@pquerna
Copy link
Owner

pquerna commented Dec 2, 2020

Closing for now - no clear defect or ask on what to change - please let me know if there is something that helps your use case.

@pquerna pquerna closed this as completed Dec 2, 2020
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

No branches or pull requests

3 participants