When using the new Identity razor components from .NET 8 you still get a link to this article: https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity-enable-qrcodes?view=aspnetcore-8.0#adding-qr-codes-to-the-2fa-configuration-page
But the article is for _cshtml files, so it does not work for me, as I use the new .razor files and the load event is never triggered. I already tried executing the code in the OnInitializedAsync() method, but there you cannot execute JavaScript code. I also tried using the OnAfterRenderAsync method, but it also never gets called. So, how can I create an Authenticator QR Code in a new Blazor application?