flutter_web_auth
                                
                                
                                
                                    flutter_web_auth copied to clipboard
                            
                            
                            
                        [iOS/macOS] Fix for Xcode 12.5
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
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 I just update the code to validate the scheme in authenticate().
Please check it out. Thank you.
Hey @kyle-seongwoo-jun,
- It seems like you copied some code from the dart core project, have you looked into the licensing/copyright implications of doing so?
 - Could we keep the schema-validator in a separate file?
 
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!