URL validation prevents custom native client callback
See original GitHub issueDescribe 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
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (4 by maintainers)

Top Related StackOverflow Question
Hi @dpromanko, We have released a new version (1.42.0) which should support this. Do let us know if you need any more help and thanks a lot for your contribution!
@poovamraj PR has been opened. I’ll check back later today/tomorrow for feedback. I also see that the api-diff is failing on circleci but I have no idea what that is for so please let me know if I missed something that caused that.