Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to authenticate with Auth0 inside of a Blazor WASM app wrapped into a Median app

$
0
0

We have a Blazor WASM application that we are releasing as an app using Median (formerly GoNative). Our app has a secured portion that required a user to sign in via Auth0.We have Auth0 working fine for normal web access. However, when logging in inside the app, we are supposed to use Median's JavaScript Bridge Library.

Here's what I came up with so far. The Median route is authenticating the user appropriately, but when it comes back to the application it just stops and seems like the app is frozen. I'm not sure what to do after the median.auth0.login JavaScript call.

Does anyone have experience with this? Since it's going thru my phone it's hard to see what's going on.

@page "/Account/Login"@inject IJSRuntime JsRuntime;@inject NavigationManager NavManager@inject IUserAgent UserAgent;@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))@attribute [AllowAnonymous]@code {    protected override async Task OnAfterRenderAsync(bool firstRender)    {        if (firstRender)        {            var isMedian = await UserAgent.IsMedian();            if (isMedian)            {                await JsRuntime.InvokeVoidAsync("median.auth0.login");            }            else            {                NavManager.NavigateTo("/Account/WebLogin", true);            }        }        //await base.OnAfterRenderAsync(firstRender);    }}

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>