Hi,@Diwakar Devangam
You have to add the required js file/js codes yourself follow this document:
Download the qrcode.js
JavaScript library to the wwwroot\lib
folder in your project.
Create a new JavaScript file called qr.js
in wwwroot/js
and add the following code to generate the QR Code:
window.addEventListener("load", () => {
const uri = document.getElementById("qrCodeData").getAttribute('data-url');
new QRCode(document.getElementById("qrCode"),
{
text: uri,
width: 150,
height: 150
});
});
Refer the required js file in EnableAuthenticator.cshtml
:
@section Scripts {
@await Html.PartialAsync("_ValidationScriptsPartial")
<script type="text/javascript" src="~/lib/qrcode.js"></script>
<script type="text/javascript" src="~/js/qr.js"></script>
}
It works as expected on myside:
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the email notification for this thread.
Best regards,
Ruikai Feng