user object is missing in the generateUrl
Closed this issue · 4 comments
MrRainesE commented
const config = { algo: "sha1", digits: 6, period: 30, secretSize: 10 };
const secret = "F5LE3AAKV7OD264A";
console.log(generateUrl(
{
issuer: "N0C",
user: "johndoe@n0c.com",
secret: secret
},
config
));
// result: https://totp/?issuer=N0C&period=30&secret=F5LE3AAKV7OD264A
godinc0 commented
Hi,
I just tested on my side and it works fine.
I think the problem is URL generation. You are not supposed to have https:// as protocol but otpauth://.
What operating system are you using?
MrRainesE commented
Windows 10. Hereby a codesandbox https://codesandbox.io/s/staging-snow-0lm3po?file=/src/App.js
godinc0 commented
Did you find any answer to your problem?
MrRainesE commented
@MarcAndreG No,user object is still missing otpauth://totp?issuer=N0C&period=30&secret=ABCDEFGHIJKLMN12
in your the example
otpauth://totp/N0C:johndoe%40n0c.com?issuer=N0C&period=30&secret=ABCDEFGHIJKLMN12