dotnet blazor maui UAE PASS authentication unable to redirect to the mobile app after authentication is done

Raju Gadda 66 Reputation points
2023-10-03T05:25:23.7233333+00:00

I'm Developing the app with UAE pass authentication using Maui Blazor technology(C#).
successfully obtained the authorization code from UAE Pass but i am facing difficulties redirecting back to mobile app. Please find the attached file.RedirectUrlIssue

I have Configured Intent filter properly in MainActivity.cs

[IntentFilter(new[] { Intent.ActionView },
Categories = new[]
{
    Intent.ActionView,
    Intent.CategoryDefault,
    Intent.CategoryBrowsable,
},
DataScheme = "https", DataHost = "patientmobile", DataPathPrefix = "/")]

this is the android manifest code.

<activity android:name=".MainActivity" android:exported="true">
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data
            android:scheme="https"
            android:host="patientmobile"
            android:pathPrefix="/" />
      </intent-filter>
    </activity>

This my redirect URL:

https://patientmobile/?code=c8***8eb-c**9-35b9-XXX-c5ab***b629&state=XXX

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,596 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,588 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 66,621 Reputation points
    2023-10-03T21:11:43.97+00:00

    your redirect url should be to the mobile app

    patientmobile://?code=c88eb-c9-35b9-XXX-c5ab**b629&state=XXX

    in the app, you start the login in a web view. your code monitors the navigation urls, and handles calls to <appname>://

    note: the authentication server should be configured to support mobile and typically you specify the app name.


0 additional answers

Sort by: Most helpful

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.