pquerna / otp

TOTP library for Go
Apache License 2.0
2.32k stars 224 forks source link

Fix URL query encoding #78

Closed kszafran closed 1 year ago

kszafran commented 1 year ago

This pull request addresses https://github.com/pquerna/otp/issues/68. I have also encountered + signs instead of spaces in Google Authenticator when using https://github.com/ory/kratos (which uses this library).

It seems to me that copy-pasting the URL-encoding function is the simplest and most robust solution here (instead of trying to do some clever replacing post-encoding). I also fixed some typos in the first commit.

kszafran commented 1 year ago

@pquerna Thank you for the quick review! Are you planning on releasing a new version soon by any chance?

pquerna commented 1 year ago

@kszafran thanks for the PR -- yes, i've tagged v1.4.0 for this.