-
Notifications
You must be signed in to change notification settings - Fork 447
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
feat: Allow for non-standard provisioning URI params, eg. image/icon #91
Conversation
Looks great, nice! Can we expect a gem release? |
Yeah, so the main branch has moved along a bit and this MR is not up to date. I'll try and get it out this week after bringing it back up to date. |
Awesome, looking forward to it! |
@TSMMark Can you give this a quick review and I'll publish it ASAP. Sorry for the delay on this. Thanks |
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.
LGTM. I might be able to test this in the next few days.
spec/lib/rotp/hotp_spec.rb
Outdated
@@ -108,14 +110,29 @@ | |||
end | |||
|
|||
describe '#provisioning_uri' do | |||
it 'accepts the account name' do | |||
let(:hotp) { ROTP::HOTP.new('a' * 32, name: "[email protected]", issuer: "Example.com") } |
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.
intentional whitespace?
let(:hotp) { ROTP::HOTP.new('a' * 32, name: "[email protected]", issuer: "Example.com") } | |
let(:hotp) { ROTP::HOTP.new('a' * 32, name: "[email protected]", issuer: "Example.com") } |
During local testing I couldn't get any image to show up my the authenticator app, even though the image param was present in the Not sure if there's some specification for the image for it to show up in an authenticator app. I'm using this OTP Auth app: https://apps.apple.com/us/app/otp-auth/id659877384 |
That last one definitely looks odd. Here's what I'm getting from the rotp with the image param: ROTP::TOTP.new(TEST_SECRET, name: "[email protected]", issuer: "Example.com",
provisioning_params: { image: 'https://assets.stickpng.com/thumbs/580b57fcd9996e24bc43c53e.png' }
)
And here's what I get in FreeOTP: From what I can tell, the image doesn't get used in Authy, and Google Authenticator doesn't do logo/images at all. |
Regarding the iOS OTP app - https://apps.apple.com/us/app/otp-auth/id659877384 - I'm guessing they've not implemented the image param feature. They also mention "OTP Auth does not connect to the internet and will not send your accounts to someone else!" which, if entirely true, would prevent fetching the image URI param. FreeOTP is the only one I've found that does it. |
I'm using OTP Auth app https://apps.apple.com/us/app/otp-auth/id659877384 and many of the accounts have images / logos. But maybe it's possible that there are some "presets" in the app, where they have some static images pre-defined based on well-known providers like 1password, binance, discord, github, google, amazon, etc |
Yeah, that would be my guess. The only references I can find to the image param are for FreeOTP, which I got to work with the image param. pyauth#96 |
No description provided.