How to Monitoring and Navigating URLs in Blazor Maui with Social Authentication

Raju Gadda 66 Reputation points
2023-12-01T06:06:18.66+00:00

I'm currently working on a Blazor Maui app using C# and integrating UAE Pass authentication. In my application, I need to monitor and navigate URLs within a Blazor page, such as Login.razor. I attempted to achieve this using an iframe, but encountered an error due to

Error_BlOCKED-BY-RESPONSE.

I'm looking for guidance on an alternative approach or a solution to monitor and navigate URLs within a Blazor page.

@page "/login" 
 <!-- My attempt with iframe --> 
<iframe src="@myUrl" width="100%" height="500px"></iframe>
  @code 
{    
 string myUrl = "https://stg-id.uaepass.ae/idshub/authorize?response_type=code&client_id=sandbox_web_stage&scope=urn:uae:digitalid:profile:general&state=HnlHOJTkTb66Y5H&redirect_uri=https://stg-selfcare.uaepass.ae&acr_values=urn:safelayer:tws:policies:authentication:level:low"; 
}
Developer technologies | .NET | Blazor
Developer technologies | .NET | .NET MAUI
Developer technologies | C#
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,926 Reputation points Volunteer Moderator
    2023-12-01T20:03:54.9066667+00:00

    Most oauth providers no longer support iframes. Typically the Maui app would create a new webview to host the login. To do want you want, you will need to write native Maui code.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.