Open josephspurrier opened 5 years ago
As an update to this, it should probably use what they actually went with in the long term, which was this: https://github.com/gokyle/twofactor/commit/bbc82ff8de72400ce39a13077627531d9841ad62#diff-0f837abc04c5952e49d1812a77d447ea
base32.StdEncoding.WithPadding(base32.NoPadding).EncodeToString([]byte(token)) gen QRCode without "WithPadding(base32.NoPadding)" will invalid , so add "WithPadding(base32.NoPadding)" in line 29
I received this error when decoding my 26 character secret.
You should probably update your code to decode the secret using this: https://github.com/gokyle/twofactor/issues/10#issuecomment-381966785