When I hit F5 in the browser, Blazor is not restarting properly. My use case is the following:
I try to run the app via ComponentsDesktop.Run<Startup>("My Blazor App", "wwwroot/index.html");. After the application has started the user is able to authenticate using MSAL with a call to
var webViewOptions = new SystemWebViewOptions()
{
BrowserRedirectSuccess = new Uri("http://app/"),
OpenBrowserAsync = uri => this.NavigateToAsync(uri)
};
await _app.AcquireTokenInteractive(_scopes)
.WithSystemWebViewOptions(webViewOptions)
.ExecuteAsync();
Without any options this would open the system`s browser, let the user sign in to the Microsoft account and then the window stays open to be closed manually.
However, I would prefer to use WebWindow to handle the login process. With the SystemWebViewOptions instance I am able to navigate to the login page. So that part works.
Now I set the property BrowserRedirectSuccess to new Uri("http://app/") to automatically navigate back on successful authentication but unfortunately that just displays the index.html file without fully starting Blazor. Maybe the javascript file is not loaded properly?
When I hit F5 in the browser, Blazor is not restarting properly. My use case is the following:
I try to run the app via
ComponentsDesktop.Run<Startup>("My Blazor App", "wwwroot/index.html");
. After the application has started the user is able to authenticate using MSAL with a call toWithout any options this would open the system`s browser, let the user sign in to the Microsoft account and then the window stays open to be closed manually.
However, I would prefer to use WebWindow to handle the login process. With the
SystemWebViewOptions
instance I am able to navigate to the login page. So that part works.Now I set the property
BrowserRedirectSuccess
tonew Uri("http://app/")
to automatically navigate back on successful authentication but unfortunately that just displays the index.html file without fully starting Blazor. Maybe the javascript file is not loaded properly?