I generate the token and save it to my DB as this with
var secret = speakeasy.generateSecret(); console.log(secret.base32); QRCode.toDataURL(secret.otpauth_url, function(err, data_url){ const registerUserQuery =INSERT INTO users (username, 2FASeed, seedURL) VALUES ('${username}', '${secret.base32}', ${data_url}) mySqlConnection.query(registerUserQuery, registrationCallback) });
When I pull the url and scan it to Google Auth, it says the token is invalid. I manually inutted the token into https://chrome.google.com/webstore/detail/authenticator/bhghoamapcdpbohphigoooaddinpkbai and it generates the correct code. What am I doing wrong?
I generate the token and save it to my DB as this with
var secret = speakeasy.generateSecret(); console.log(secret.base32); QRCode.toDataURL(secret.otpauth_url, function(err, data_url){ const registerUserQuery =
INSERT INTO users (username, 2FASeed, seedURL) VALUES ('${username}', '${secret.base32}', ${data_url})mySqlConnection.query(registerUserQuery, registrationCallback) });
When I pull the url and scan it to Google Auth, it says the token is invalid. I manually inutted the token into https://chrome.google.com/webstore/detail/authenticator/bhghoamapcdpbohphigoooaddinpkbai and it generates the correct code. What am I doing wrong?