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.

The browser won't get closed and hence not able to catch the sign-in response

See original GitHub issue

Hi, the demo app won’t return back to the caller activity after authentication is successful. I have used the default settings what was already made for this app. here is the manifest extract from the demo app.

<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="https"
          android:host="net.openid.appauthdemo"
          android:path="/oauth2redirect"/>
  </intent-filter>
</activity>

Is this default setting in the demo app needs to be modified? after succesful login, the browser wont get closed and hence not able to go back to the MainAcitivity of this app. (Also, I have not completely understood the redirect/uri scheme here. pls point me to the links that provide more info about it)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
iainmcgincommented, Feb 8, 2017

This should do it:

BrowserBlacklist blacklist = new BrowserBlacklist(
    new VersionedBrowserMatcher(
        Browsers.SBrowser.PACKAGE_NAME,
        Browsers.SBrowser.SIGNATURE_SET,
        true, // custom tab
        VersionRange.ANY_VERSION));

AuthorizationService authService = new AuthorizationService(
    context,
    new AppAuthConfiguration.Builder()
        .setBrowserMatcher(blacklist)
        .build());

authService.performAuthorization(authRequest, completionIntent);

Once we have confirmation that custom tabs are fixed in SBrowser at a particular version, VersionRange.ANY_VERSION can be substitutedFor VersionRange.atMost(SBROWSER_FIX_VERSION) where SBROWSER_FIX_VERSION will be the last broken version number of SBrowser.

0reactions
ZeCarlosCoutinhocommented, Dec 22, 2020

Should this work with a regular deep link? Or does AppAuth require a app link to work properly with HTTPS redirects? (https://developer.android.com/training/app-links#app-links-vs-deep-links)

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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