question-mark
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.

Redirect URI not working on Android

See original GitHub issue

Hi all,

I followed the procedure described in the readme. On iOS it works as expected, but on Android, I can provide my credentials but then I get “This site can’t be reached”, It shows the expected redirect url msal{appid}😕/auth/?state={very long token} ERR_UNKOWN_URL_SCHEME.

This is my manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
	<uses-sdk android:minSdkVersion="15" />
	<application android:label="XXXXXX"></application>
  <activity android:name="com.microsoft.windowsazure.mobileservices.authentication.RedirectUrlActivity" >
    <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{appid}" android:host="auth" />
    </intent-filter>
  </activity>
</manifest>

I have replaced {appid} with the id of my native application, not that of the API application.

My MainActivity contains the overridden OnActivityResult from the sample.

Please advise.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:28

github_iconTop GitHub Comments

1reaction
jcampanacommented, Apr 17, 2018

@jennyf19 I am using the version 1.1.1-preview0040, and runs OK.

1reaction
jcampanacommented, Jan 24, 2018

Hi everybody, @josuuribe, @pedramp20 I need your help. I Implement a PCL project with versions of iOS and Android. iOS works fine, but Android version, the app open the login with Microsoft, but when redirect, i have the next error:

Java.Lang.RuntimeException Unable to instantiate activity ComponentInfo{com.myapp/com.microsoft.identity.client.BrowserTabActivity}: java.lang.ClassNotFoundException: Didn’t find class “com.microsoft.identity.client.BrowserTabActivity” on path: DexPathList[[zip file “/data/app/com.myapp-1/base.apk”],nativeLibraryDirectories=[/data/app/com.myapp-1/lib/x86, /data/app/com.myapp-1/base.apk!/lib/x86, /system/lib, /vendor/lib]]

I use a device with Chrome installed, and use the same AndroidManifest.xml that you post here.

Any suggestion please?

Thanks in advance!

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth redirect with an App Link not working occasionally
In our app, we're using AppAuth-Android to implement this flow. As a redirect URI, we're using an HTTPS scheme link - https://example.com/ ...
Read more >
Redirect URI is not been handled by the app and therefore ...
Android app is unable to catch the redirect Uri and therefore unable to complete authentication. I don't seem to see where the issue...
Read more >
Redirect URL error on android pinned web - Microsoft Q&A
Redirect URL error on android pinned web ... Hi, I'm having a really strange behaviour. I have a webapp working as expected, using...
Read more >
Redirect URI Problem
It's solved by setting redirect URI to "https://app.box.com/static/sync_redirect.html" in console, but I don't know this solution is right.
Read more >
Error AADSTS50011 the redirect URI does not match ...
This error occurs if the redirect URI (reply URL) configured in the application (code) and the Azure AD app registration don't match. When...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found