proyecto26 / react-native-inappbrowser

📱InAppBrowser for React Native (Android & iOS) 🤘
https://www.npmjs.com/package/react-native-inappbrowser-reborn
MIT License
1.29k stars 218 forks source link

Add error description to openAuth response #412

Closed daviddulak closed 8 months ago

daviddulak commented 1 year ago

Currently there is no way to distiguish between user canceled and canceled from an error. Adding the error description allows for a better user experience.

PR Checklist

What is the current behavior?

Currently when openAuth is terminated by error or by the user hitting cancel, the result is the same and type: cancel is returned Example - {"type":"cancel"}

What is the new behavior?

This change simply adds the error description if it exists so a better user experience can be achieved. Example - {"type":"cancel","description":"The UIWindowScene for the returned window was not in the foreground active state."}

Fixes/Implements/Closes #[Issue Number].