ASWebAuthenticationSession's callbackURLScheme crash

  • is this issue fixed by Auth0 in latest SDK? I am also facing the same issue with latest xcode.

Add a Comment

Apple Recommended

  • If I just use myscheme without "://" or ":/" the OAuth request is rejected by Google and Facebook with the error saying "Missing scheme in the URI". Please fix this. Why do you reject the traditional scheme format all of sudden?

  • Same for me, on iOS 14.5, crashing. Encoding redirect uri doesn't help since the Auth0 doesn't recognise it in this case: "Invalid parameter: redirect_uri". Me redirect uri looks line "my-app://sso", so omitting is not an option. Would be nice to have a solution asap.

  • The above answer refers only to the callbackURLScheme parameter passed to ASWebAuthenticationSession, not the full redirect URI used by the OAuth provider.

Replies

Hi, had the same issue.
The solution in my case was to create a new additional scheme only for authentication purpose e.g. "myappauth"
Don't forget to add the scheme to your Info.plist (URL types -> URL Schemes)

Regards,
Vlad
We are experiencing the same issue.
Would be grateful to have a feedback from Apple on this issue.

The solution in my case was to create a new additional scheme only for authentication purpose e.g. "myappauth"

Yes, that is the solution but in all cases its not possible to re-register scheme as we are accessing lot of customer portals.
Would be grateful if someone from Apple address this.

Regards,
Nimesh
Before adding the uri, try url encoding it :
Code Block
callBackURI.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)

This worked for me.
  • this is working fine in preventing the crash, but it seems it doesn't make callsback's properly after authentication.

  • @chaitu..thandu did you find any solution

Add a Comment
The answer above by apoorvet also worked for me. Wooooo!

Having the same issue now that I build the app with iOS 14.5.

I will use the work-around mentioned by apoorvet (thanks!), but this is surely a bug right?

  • If I just use myscheme without "://" or ":/" the OAuth request is rejected by Google and Facebook with the error saying "Missing scheme in the URI". Please fix this. Why do you reject the traditional scheme format all of sudden?

  • Same for me, on iOS 14.5, crashing. Encoding redirect uri doesn't help since the Auth0 doesn't recognise it in this case: "Invalid parameter: redirect_uri". Me redirect uri looks line "my-app://sso", so omitting is not an option. Would be nice to have a solution asap.

  • The above answer refers only to the callbackURLScheme parameter passed to ASWebAuthenticationSession, not the full redirect URI used by the OAuth provider.