I am no longer making updates to this fork. Please refer to the original repository, or fork this one in order to maintain it.
Cordova Plugin for iOS 12 ASWebAuthenticationSession API. Originally forked from rak13/cordova-plugin-ios-aswebauthenticationsession and updated to address an issue present after updating to iOS 13.
window.plugins.ASWebAuthSession.start("myappurlscheme://dummy/staff", 'https://linktoopen.someplace.com/index.html',
function(msg){
console.log("Success ", msg);
}, function (err) {
console.log("Error " + msg);
});
iOS 13 introduced a requirement that ASWebAuthenticationSession needs a presentationContextProvider to provide a "display context in which the system can present an authentication session to the user."
The changes in this plugin should address an error that was thrown when trying to use ASWebAuthenticationSession after updating to iOS 13: "Cannot start ASWebAuthenticationSession without providing presentation context. Set presentationContextProvider before calling -start."