Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android project won't redirect back to app

See original GitHub issue

I’m a bit new to Azure & Xamarin.Forms and am trying to build a simple login application. I’ve gone through this tutorial multiple times and can’t help but feel like I’m missing something. My application successfully brings me to the login page & allows me to enter my credentials, but when I click login it brings me to a blank screen (as seen below).

screen shot 2018-03-21 at 7 50 26 pm

My android manifest looks like:

<uses-sdk android:minSdkVersion="25" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <application> <activity android:name="microsoft.identity.client.BrowserTabActivity"> <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="msal{app-id-of-native-aad-application}" android:host="auth" /> </intent-filter> </activity> </application> </manifest>

The redirect URI of my native app is set to msal{app-id-of-native-aad-application}😕/auth and the reply URI of my api (though from what i’ve seen this doesn’t really matter) is set to https://localhost:44316/

I’ve changed the variables in the PCL as follows:

public static readonly string Tenant = ""; // Domain/resource name from AD B2C
        public static readonly string ClientID = "{app-id-of-native-aad-application}"; // Application ID from AD B2C
        public static string PolicySignUpSignIn = "B2C_1_LoginApp"; // Policy name from AD B2C
        public static string PolicyEditProfile = "B2C_1_EditProf";
        public static string PolicyResetPassword = "B2C_1_ResetPass";

        public static readonly string[] Scopes = { "", ""}; // Leave blank unless additional scopes have been added to AD B2C
        public static string ApiEndpoint = "";

        public static string AuthorityBase = $"{Tenant}/"; // Doesn't require editing
        public static string Authority = $"{AuthorityBase}{PolicySignUpSignIn}"; // Doesn't require editing

Am I missing something/does anyone have suggestions?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

Livvencommented, Sep 17, 2018

@jennyf19 Thanks for the follow-up! Think it should solve as well too. I’ll let you know if it works out.

jennyf19commented, Sep 16, 2018

Any update on this @Livven @kcorrea96 ?

We now have the option for embedded webview in MSAL (which does not require custom tabs)…please check out the MSALv2.0.1-preview release.

We would love your feedback as well. You can reach me directly or open an issue on the MSAL repo. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to redirect back to Android app?
I need to open a Custom Chrome tab that brings the user to my website, and then redirects the user back to the...
Read more >
How to Redirect Links on Android to Open in the App You ...
From this point on, whenever a link opens in the wrong app for any reason, just head to the Android share menu, then...
Read more >
Android 12 App links not working
Hey everyone, I have ran into an issue where verified app links do not trigger a redirect to our app on Android 12....
Read more >
Remediation for Intent Redirection Vulnerability
One or more of your apps contain an Intent Redirection issue which can allow malicious apps to access private app components or files....
Read more >
Android app not redirecting back to app after completing a ...
Ensure that you have implemented a return_url in the PaymentIntent, and that the URL is in the AndroidManifest.xml file.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found