avalle Active Member Licensed User Longtime User Aug 31, 2018 #1 I am implementing an application that uses OAuth 2.0 to authorize access to external authenticated resources available from a service provider. The authorization phase occurs starts within a web browser screen called with Code: Copy Dim job As HttpJob job.Download(OAuth2Link) When the OAuth authorization has completed (e.g. I have obtained the access_token), I want to close the web browser window programatically from the B4J app. Is it ever possible? It may be possible to constrain the context, e.g. running on Windows and using Chrome as the system-default web browser. P.S. I am not using a Webview as recommended by Google, although the authorization server is not from Google. Thanks Andrea
I am implementing an application that uses OAuth 2.0 to authorize access to external authenticated resources available from a service provider. The authorization phase occurs starts within a web browser screen called with Code: Copy Dim job As HttpJob job.Download(OAuth2Link) When the OAuth authorization has completed (e.g. I have obtained the access_token), I want to close the web browser window programatically from the B4J app. Is it ever possible? It may be possible to constrain the context, e.g. running on Windows and using Chrome as the system-default web browser. P.S. I am not using a Webview as recommended by Google, although the authorization server is not from Google. Thanks Andrea
Daestrum Expert Licensed User Longtime User Aug 31, 2018 #2 You could close the current tab on the web browser, closing down the entire browser may upset users if they have other pages open in other tabs. Something like in javascript (not tested) browser.tab.remove(browser.tabs.getCurrent()) Last edited: Aug 31, 2018 Upvote 0
You could close the current tab on the web browser, closing down the entire browser may upset users if they have other pages open in other tabs. Something like in javascript (not tested) browser.tab.remove(browser.tabs.getCurrent())
Erel B4X founder Staff member Licensed User Longtime User Aug 31, 2018 #3 There is no simple way to do it. You can try to find the browser process and kill it however it doesn't sound like a good idea. Upvote 0
There is no simple way to do it. You can try to find the browser process and kill it however it doesn't sound like a good idea.
avalle Active Member Licensed User Longtime User Aug 31, 2018 #4 Any code hint on how to do that? Thanks in advance! Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Sep 2, 2018 #5 Call taskkill with jShell: https://ss64.com/nt/taskkill.html Upvote 0
Mark Read Well-Known Member Licensed User Longtime User Sep 2, 2018 #6 Does this help at all? Link Upvote 0