Replace strings.TrimRight with base32.NoPadding
opened this issue · comments
Deleted user commented
In totp.Generate()
there is
v.Set("secret", strings.TrimRight(base32.StdEncoding.EncodeToString(secret), "="))
to remove the "=" used for padding. Instead of trimming the result, the following should be used:
base32.StdEncoding.WithPadding(base32.NoPadding).EncodeToString(secret))