Skip to content

URL validation prevents custom native client callback #424

@dpromanko

Description

@dpromanko

Describe the problem you'd like to have solved

Today, the AuthApi.authorizeUrl method does validation for URLs using okhttp's HttpUrl.parse which forces the callback to be either http or https. This prevents the callback being a custom URI scheme for native clients.

The use-case behind wanting support for this is we are moving our clients away from calling Auth0 directly (via the client SDKs) and knowing the details of Auth0 (clientIds, scopes, etc) and letting one dedicated/trusted backend own all that and call Auth0 (via this Java SDK). This means we do have scenarios where we will be calling this method and the callback will be a custom URI scheme for a native app.

Describe the ideal solution

Don't enforce that the callback have a http or https scheme.

Alternatives and current work-arounds

A workaround would be to call this method as intended with a valid hard-coded https URL and then string replace that piece of it to the native app's callback URL.

Additional information, if any

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA feature has been asked for or suggested by the community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions