xlzd / gotp

Golang OTP(One-Time Password) Library.
MIT License
468 stars 67 forks source link

'@' Symbol #21

Closed rhysjtevans closed 2 years ago

rhysjtevans commented 2 years ago

https://github.com/xlzd/gotp/blob/fab697c03c2c75f423710795f6b00b53c6c5442f/utils.go#L42

Hi, I've stumbled on your library and like it! While I was testing I noticed this. Most accounts are linked to email addresses that obviously include '@' symbol. Any reason why we are URL Escaping the account?

Problem is when passing the URI to a QR code generator the email is translated to ....%40domain.com

rhysjtevans commented 2 years ago

Temporarily getting round this via a text replace on the string before passing it to the QR Code generator but would be nice if you removed this

mergenchik commented 2 years ago

Hi, in official docs label should be URI encoded, but not URL.

mergenchik commented 2 years ago

@rhysjtevans can you please check and confirm that current issue is fixed

mergenchik commented 2 years ago

Closing this issue