-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
How to trigger custom URL scheme calls in an IAB window opened with _blank? #347
Comments
I took the liberty to rewrite your feature request into a question on how to make this work. Please check if this still represents what you want to do, then I can maybe give you some input. (Please open an additional issue for the feature request that was here - a short "I want close to work with _system" or similar should be enough, link to the other two issues for context.) |
i honestly don't care how the browser is called or what it looks like, as long as it can call custom URL schemes and i can close it after then alles ist gut |
I assume this means that my description of your usecase is still correct ;) So: You can react to specific URLs being opened in the IAB window in your code. Take this snippet as an example:
Instead of Of course this only works if Could this work for you? |
yes I suppose this could work, I will give it a go and let you know in a few days. it's. a bit cheating though :P |
It's one solution for the problem that many OAuth configurations only accept valid URLs with |
@janpio it's a dead end for me, the vendor we work with seems to call our app using a POST request, meaning it can't be read by loadstart. any suggestions? |
Huh, so the external flow does a POST to submit the data back to you? That's the first time I encounter that. Can you maybe share the vendor? Here are the available events: https://github.com/apache/cordova-plugin-inappbrowser#inappbrowseraddeventlistener
|
i tried everything, only event i get back is 'exit'. |
Sure, use my last name @gmail.com or "sujan" in the Cordova Slack at slack.cordova.io. A super hacky (=awesome!) workaround: Create a simple script at a server you control as the return URL that accepts the POST, then redirects to a URL of your choice via GET with the same parameters - that you then can catch with |
Any updates on this? I need to be able to open a third party app from inside an iab window. I can't control the page opening the app. |
I have the same issue. Does anybody know if this problem is fixed? Or any way to close the window when use "_system" after redirect with the custom scheme? |
AFAIK URLs opened with
'_blank'
cannot trigger custom URL scheme calls, meaning that if the website I just opened would try to call back my app using"myapp://"
but would fail because that browser doesn't grant this capability.on the other hand, URLs opened with
'_system'
do enjoy this functionality, but sadly cannot be closed after ending their task with"ref.close()"
.there is no point of having a
close()
method when the browser cannot provide feedback to the app.. when should the app know to close the browser? it can't even can't receive any kind of feedback using'_blank'
.How can I work around this?
The text was updated successfully, but these errors were encountered: