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 Problems

See original GitHub issue

I have a custom redirect URI customuri://com.baseurl/auth. I have this value set in the manifest as shown here:

    <activity
        android:name="net.openid.appauth.RedirectUriReceiverActivity"
        tools:node="replace">
        <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="customuri://com.baseurl/auth"/>
        </intent-filter>
    </activity>

When watching the web traffic after logging in I see a redirect call being made with this url https://my.baseurl.com/connect/authorize?redirect_uri=customuri://com.baseurl/auth

The redirect does not work. The app is never called again, the chrome browser just shows an empty webpage. What am I doing wrong?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
dsuresh-apcommented, Mar 19, 2020

Shouldn’t it be like this:

<activity
        android:name="net.openid.appauth.RedirectUriReceiverActivity"
        tools:node="replace">
        <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="customuri"
                       android:host="com.baseurl" />
        </intent-filter>
    </activity>

Where scheme is customuri and the host is com.baseurl? There is more info here for the data tag.

0reactions
agologancommented, Jun 3, 2021

@dsuresh-ap is right. The data element in the OP’s question was incorrectly defined. Closing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error AADSTS50011 the redirect URI not match the redirect ...
This error occurs if the redirect URI that the application sent doesn't match any of the redirect URIs that are registered on the...
Read more >
Redirect URI Problem - Box Support
Hello. I found two library used to implement OAuth2.0 in my android application. API1) https://github.com/box/box-android-sdk.
Read more >
The Ultimate Guide to Redirects: URL Redirections Explained
Website owners often set up redirects for pages that are broken, contain duplicated content, or were moved to new URLs. This way, users...
Read more >
Problem with customizing redirect_uri - Questions
When a user navigates to some Url in our app, after the login we want the user to get redirected back to the...
Read more >
Make Redirection Evil Again: URL Parser Issues in OAuth
We then introduce new OAuth redirection attack techniques which exploit the interaction of URL parsing problems with redirection handling in mainstream browsers ...
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