2FA Totp

Hello, i wanna add 2fa TOTP to credentials login. How can i generate a QR code for user to scan ?
No description
Solution:
That's out of Better-Auth's scope at what we provide. You should find a library that does this
Jump to solution
6 Replies
wvn
wvnOP3w ago
My current code is this. I enter the password and i need to somehow show a QR code. But how ?
No description
Solution
Ping
Ping3w ago
That's out of Better-Auth's scope at what we provide. You should find a library that does this
Ping
Ping3w ago
npm
qrcode
QRCode / 2d Barcode api with both server side and client side support using canvas. Latest version: 1.5.4, last published: 8 months ago. Start using qrcode in your project by running npm i qrcode. There are 3278 other projects in the npm registry using qrcode.
wvn
wvnOP3w ago
Okay thanks i will look at it. And one think. Does it generate backup codes after the user verify the 2fa code or ?
Ping
Ping3w ago
no, that would have to be implemented separately.
wvn
wvnOP3w ago
So the user verify a password then show QR code and then show backup codes ? Ohh i see now :9367kekwlaugh:

Did you find this page helpful?