Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Xcode 12.5 and iOS 14.5: The provided scheme is not valid. A scheme should not include special characters such as ":" or "/". #189

Closed
sstuenkel opened this issue Apr 29, 2021 · 7 comments · Fixed by #196
Assignees
Labels

Comments

@sstuenkel
Copy link

sstuenkel commented Apr 29, 2021

Describe the problem

Trying to authenticate on iOS using Xcode 12.5 and iOS 14.5 results in the Exception: The provided scheme is not valid. A scheme should not include special characters such as ":" or "/".

The same error is described here: auth0-samples/auth0-react-native-sample#45 and there is already a PR pending, so I think this should be an easy fix.

@mduchev
Copy link

mduchev commented Apr 29, 2021

I can confirm that the same is happening on my end. Just a small correction - the latest Xcode version is 12.5.
Xcode versions below 12.5 are working flawlessly. Even Xcode 12.5 and iOS version lower than 14.5 is working again. The problem is when we have both latest Xcode (12.5) & iOS (14.5) versions.

There is already a PR made - auth0/react-native-auth0#369 that fixes auth0/react-native-auth0#360

@frederikprijck
Copy link
Member

Thanks for reporting this, looks like this is indeed an issue.

We will look into this as soon as possible and see if the fix is close to identical as to the fix we did for the React Native SDK.

@MarkusHorstmann
Copy link

MarkusHorstmann commented Apr 29, 2021

It appears that the fix (or at least a workaround) is in https://github.com/auth0/auth0-oidc-client-net/blob/master/src/Auth0.OidcClient.iOS/ASWebAuthenticationSessionBrowser.cs, line 59:
options.EndUrl,
=> new NSUrl(options.EndUrl).Scheme,

@sstuenkel
Copy link
Author

sstuenkel commented Apr 30, 2021

In the meantime you can downgrade to SFAuthenticationSessionBrowser as a workaround:

var client = new Auth0Client(new Auth0ClientOptions { Domain = "YOUR_AUTH0_DOMAIN", ClientId = "YOUR_AUTH0_CLIENT_ID", Browser = new SFAuthenticationSessionBrowser() });

@mduchev
Copy link

mduchev commented Apr 30, 2021

I can confirm that the workaround works fine. I suppose that the fix is indeed in the indicated lines above. We'll wait for a new release then.

@frederikprijck frederikprijck self-assigned this Apr 30, 2021
@errolcash
Copy link

In the meantime you can downgrade to SFAuthenticationSessionBrowser as a workaround:

var client = new Auth0Client(new Auth0ClientOptions { Domain = "YOUR_AUTH0_DOMAIN", ClientId = "YOUR_AUTH0_CLIENT_ID", Browser = new SFAuthenticationSessionBrowser() });

I tried this and i now get an error from the browser stating that the address is invalid. This workaround seems to still not work for me.

@frederikprijck
Copy link
Member

Hey all, I opened a PR that should fix this. Feel free to verify if it solves your problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants