Closed laoshanxi closed 2 years ago
Hi,
The QR code is generated by the website where 2FA is enabled. It contains, at least, a secret used to generate password using cryptography functions. This secret is known only by you and the website.
The common process is:
See https://allthingsauth.com/2018/04/20/a-medium-dive-on-the-totp-spec/ for more (tech) information.
Thanks for the kindly explanation, so the website (like github) need record the secret carefully in order to verify the code, and the secret should be kind of confidential that should not leak to another body, when the user register again, the secret will be updated to a new one. is my understanding correct.
I am trying to implement a TOTP backend for https://github.com/laoshanxi/app-mesh , and will try to use this project to generate the 2FA code.
when the user register again, the secret will be updated to a new one. is my understanding correct.
Yes. A secret is valid for a user account until this account is deleted or 2FA is disabled.
I am trying to implement a TOTP backend for https://github.com/laoshanxi/app-mesh , and will try to use this project to generate the 2FA code.
app-mesh is mostly written in C#, 2FAuth use PHP plus a framework (Laravel) so not sure this is the best approach. Have a look to those repos: https://github.com/search?l=C%23&o=desc&q=totp&s=stars&type=Repositories
app-mesh is written with c++, I found a library (http://www.nongnu.org/oath-toolkit/) to help implement the backend totp logic.
thanks so much.
Hi, I am new to 2FA and looking at this helpful project.
I wonder to known the process of 2FA, when adding a website( E.g Github, Facebook) for a user, who response to generate the QR code (by my understanding, the QR code should contain the information of github url and user name, not sure what else there). if the website itself provide the QR code?
Thanks in advance.