flutter_web_auth icon indicating copy to clipboard operation
flutter_web_auth copied to clipboard

[iOS/macOS] Fix for Xcode 12.5

Open kyle-seongwoo-jun opened this issue 4 years ago • 3 comments

Problem

Crash on native (iOS, macOS) when callbackURLScheme is an entire URL like foo://bar.

References: https://github.com/auth0/react-native-auth0/issues/360, https://github.com/auth0/react-native-auth0/pull/369

kyle-seongwoo-jun avatar May 21 '21 07:05 kyle-seongwoo-jun

Would you mind explaining a bit more why this is needed? The argument is called callbackURLScheme so I think it's implied that you should pass a scheme and not an entire url? 🤔

Could we instead detect if an entire url is passed and raise an appropriate error? 🤔

LinusU avatar Jul 29 '21 17:07 LinusU

@LinusU I just update the code to validate the scheme in authenticate().

Please check it out. Thank you.

kyle-seongwoo-jun avatar Jul 31 '21 03:07 kyle-seongwoo-jun

Hey @kyle-seongwoo-jun,

  1. It seems like you copied some code from the dart core project, have you looked into the licensing/copyright implications of doing so?
  2. Could we keep the schema-validator in a separate file?

LinusU avatar Sep 07 '21 13:09 LinusU

Thanks for taking the time to submit this PR! 🙏

Since the last comments wasn't addressed I implemented this using a regex instead: https://github.com/LinusU/flutter_web_auth/commit/4f89925117e31c9874e60c7bc379967233505284

Happy hacking!

LinusU avatar Nov 01 '22 09:11 LinusU