Closed Laftek closed 1 month ago
Hey! :)
What content are you passing in for the QR Code? Passing in just the secret as you have shown in the 3 examples isn't enough for 2FA apps - there is a little more to the structure required.
(Its been a while since I looked at it, so had to look it up again sorry) You can use this tool: https://stefansundin.github.io/2fa-qr/ Paste in your code as the secret, provide a label (this will identify your app / website / service etc. Optionally, provide an issuer. Then see the otpauth uri, you would provide that as the content to the QR code, to be scanned by the auth app.
Usually, I would use label as the name of my website, or if you expect users to have multiple accounts, or multiple 2fa codes, use label as the account name / use case and issuer as the website name.
For example, a game I play allows multiple accounts, and they set issuer to their company name, and label to my account name. Alternatively, a crypto exchange I am aware of sets issuer to their name, and label as either "signin" or "Funding" as they have different 2FA codes for signing into your account, or depositing / withdrawing funds.
I'm hoping this resolves it for you! Let me know if not, in which case let me know an example of the URI you are trying to use and I will look further into it. :)
Thank you its working now! I thought only secret is needed for QRcode creation as manual input of secret is enough. I have used authenticatorUri instead and its working like a charm. Thanks @pingu2k4 !
Glad you've got it working! :)
Describe the bug
Library is working great but for some reason its not working for Authy (did not try microsoft or google) by scanning QR code. I tried to delete spaces or replace them with dashes but its probably not the issue. 4izo kyps 2qx7 wv2l mk45 46xu 272b ni4p 4izokyps2qx7wv2lmk4546xu272bni4p 4izo-kyps-2qx7-wv2l-mk45-46xu-272b-ni4p
I also tried different appearances. I am using it for ASP.NET identity framework.
Thanks.
Reproduction Steps
...
Expected Behaviour
No response
Screenshots / Examples
No response
.NET version
8.0
Interactivity Mode
Interactive Server
Additional Context
No response