ruimarinho / authy-client

A complete Authy client with support for TOTP, OneTouch, Phone Verification and Phone Intelligence APIs
122 stars 27 forks source link

Encode space as + in signature assertion #9

Closed holm closed 8 years ago

holm commented 8 years ago

Through a few too many hours of debugging, I found that Authy encodes spaces as + while the qs library encodes it as %20. Both are valid, but they need to be consistent for the signature to match.

I couldn't find any option in qs for using + instead of %20, so I ended up doing a bit of a hack to replace %20 with +.

ruimarinho commented 8 years ago

Thanks for the PR @holm. I'm under heavy load this week so I'll take a look at the PR as soon as I have some free time.

ruimarinho commented 8 years ago

Thank you for catching this one! Landed on https://github.com/seegno/authy-client/commit/70e0c185add082056b29c3bd150db5833ac2d34b, published as v1.0.4 on npm.