-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add counter value when triggering ROTP#provisioning_uri #76
Add counter value when triggering ROTP#provisioning_uri #76
Conversation
Hi @wenderjean ! 👋 Thanks for your contribution (and delayed review of my part) 🤝 🍻 That's a great fix! In fact, when we generate the provisioning uri with otp counter previously used (and then with a value greater than zero), the authenticator app and server/backend must be in sync (i.e., with the same counter value). Please, could you fix the CI warnings and file conflicts? After that, @robertomiranda , I think we are ready to merge it ✅ 🏁 |
298c93e
to
bfc030e
Compare
bfc030e
to
09e44e4
Compare
09e44e4
to
c0e6775
Compare
I'll take a look on tests asap guys, I'm using a different PC right now for that reason I'm getting those issues. |
Thanks a lot @wenderjean 🍻 Let us know when you got tests working well 🤝 We will be glad to review it Thanks again for your effort on it 🥇 |
c0e6775
to
7af39ca
Compare
assert_match %r{^otpauth://totp/Example\:roberto\?secret=\w{32}&issuer=Example$}, @visitor.provisioning_uri("roberto", issuer: "Example") | ||
account = %r{ | ||
^otpauth://totp/Example\:roberto\?secret=\w{32}&issuer=Example$ | ||
}x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trick for multi-line regex content: }x
All good @pedrofurtado :) |
Thank you for your effort on it, @wenderjean ! 🤝 Our team is planning (especially me and @robertomiranda) to release this and some other improvements/bugfixes in a new release soon 🎉 |
Related to: #74
Changes
self.otp_counter
when callingROTP#provisioning_uri
in order to have it on the final URIConcerns
Note.: Taking a look at the source it doesn't seem we're caring about the
houndci-bot
for line length metrics. Did we enablehoundci-bot
recently?