-
Notifications
You must be signed in to change notification settings - Fork 28
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
Feature: provide interface for controlling the advanced webview #17
Comments
I'd have to look but I don't recall seeing any native methods on the APIs
that allow programmatically closing chrome/safari. Can you look into the
native APIs and see if closing them is a method exposed? If not there
likely isn't anything we can do. You might be better off with the core
webview in nativescript that is exposed.
…On Thu, Jun 29, 2017, 1:11 PM Jonathan Samples ***@***.***> wrote:
I'm trying to use the advanced webview for an oauth workflow. The problem
is that I need programatic access to the webview so that I can close it
when the workflow completes. Right now it only allows user interaction to
control it.
PS. I'd be happy to collaborate on it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#17>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFulhOID0S7KVkk6KMUSdjlf4V2KQgtoks5sI-jHgaJpZM4OJrUz>
.
|
I know iOS has it: Not sure about Android |
Also, I can't use the built-in webview because of Google's restricted requirements for OAuth. |
Gotcha. Well if android has something then that would be a great addition
to add. Id like to add more of the options for it I just don't have time
right now to do a lot. Can definitely help with questions and PRs :)
…On Thu, Jun 29, 2017, 1:40 PM Jonathan Samples ***@***.***> wrote:
Also, I can't use the built-in webview because of Google's restricted
requirements for OAuth.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFulhMQ6Kgnmr6weJOtjfHll1NYwcgOQks5sI--ngaJpZM4OJrUz>
.
|
Looks like you can close any active activity on Android if you have access to it. Just need to figure that part out. Disclosure: never written a native Android app. I'll put together a PR. |
Poke around here on the android docs: https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent.Builder.html - my quick glance didn't look promising on the API for customtabs - but yea closing the Chrome activity seems reasonable 👍 I wasn't thinking that direction to be honest. |
@jonnysamps trying to do something similar (use WebView to login / grab token from WebView then close WebView). How did you end up implementing? |
Hello, any progress on this? I think this is a major issue for developers using advanced webview for OAuth authentication flow. Especially in iOS, the plugin should expose e method to closed automatically Safari View Controller after redirect to custom URL. |
The way I handle this: from my web app that completes OAuth, I use an x-callback-url that my native app receives. Based on that, I dispatch an event globally to dismiss/close the SafariViewController. |
I'm trying to use the advanced webview for an oauth workflow. The problem is that I need programatic access to the webview so that I can close it when the workflow completes. Right now it only allows user interaction to control it.
PS. I'd be happy to collaborate on it.
The text was updated successfully, but these errors were encountered: