Skip to content

Problem in handling NOT hierarchical URI #552

Open
@stezan

Description

@stezan

Schermata 2020-06-08 alle 17 30 59

When the browser is visible in the step 2 of the Authentication flow, if I try to open a url through my app, the application crashes

java.lang.RuntimeException: Unable to resume activity {com.app.name/net.openid.appauth.AuthorizationManagementActivity}: java.lang.UnsupportedOperationException: This isn't a hierarchical URI.

I think that the problem is in the way the library handles the received intent that at some time pass though this function in the AuthorizationManagementActivity

private Intent extractResponseData(Uri responseUri) { if (responseUri.getQueryParameterNames().contains(AuthorizationException.PARAM_ERROR)) { return AuthorizationException.fromOAuthRedirect(responseUri).toIntent(); } else { [...] } }

The getQueryParameterNames() function of the java.net.URI class, throws an exception because before doing anything else, it checks if the link is hierarchical.

More information at: https://stackoverflow.com/questions/62191135/appauth-android-strange-problem-in-handling-not-hierarchical-uri-callback-intent

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionredirect-handlingIssues that are affected by browser auth redirect handling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions