Android project won't redirect back to app
See original GitHub issueI’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).
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 = "qalog.onmicrosoft.com"; // 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 = { "https://qalog.onmicrosoft.com/api/read", "https://qalog.onmicrosoft.com/api/user_impersonation"}; // Leave blank unless additional scopes have been added to AD B2C
public static string ApiEndpoint = "https://fabrikamb2chello.azurewebsites.net/hello";
public static string AuthorityBase = $"https://login.microsoftonline.com/tfp/{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:
- Created 5 years ago
- Comments:7
Top GitHub Comments
@jennyf19 Thanks for the follow-up! Think it should solve https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/589 as well too. I’ll let you know if it works out.
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!