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

Changes to ASWebAuthenticationSession's callbackURLScheme iOS SDK 14.5 #370

Open
ilionsd opened this issue Jun 8, 2021 · 0 comments
Open

Comments

@ilionsd
Copy link

ilionsd commented Jun 8, 2021

Hello,

Since iOS SDK 14.5 (Xcode 12.5) ASWebAuthenticationSession instantiation might crash with exception:

NSInvalidArgumentException: The provided scheme is not valid. A scheme should not include special characters such as ":" or "/".

The solution would be to use: callBackURI.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed) before passing it to callbackURLScheme.

I see that currently URL.scheme is being passed to callbackURLScheme and it should not include ':' or '/', but may be it would be nice to add encoding to future-proof code changes to some extend?

More info here: https://developer.apple.com/forums/thread/679251

Thanks!

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

No branches or pull requests

1 participant