Reputation: 117
What I want to do seems simple, but I cannot find any reference. I just want to make my Twebbrowser (or any embedded browser or suitable component - for the sake of argument I just use Twebbrowser as an indicator of whatever component I need - the unknown unknowns) the default. The scenario is that when I try to access Dropbox it pops a webpage with the userID/Password, it then pops a webpage with an allow button.
I simply want these webpages to appear in my Twebbrowser and NOT to display an instance of the user default browser (ie. chrome in my case). When I have addressed the two pages I simply want to set the default browser back to whatever it was. Seems simple, but I have no idea how to achieve this. To recap:
The point is I am not supplying URLs to the Twebbrowser component, the system is generating the activity quite outside my control and based on whether or not specific conditions are met (and I have no way of knowing whether these have been met, for example there may be a session ID and Key, but these could have expired). I have searched the web and cannot find anything likely. I am no expert, but I would have thought a property like ...Make this default... would be useful. It is probably something really simple, but I cannot figure it out.
Any help would be appreciated.
Upvotes: 0
Views: 1096
Reputation: 36644
You have two options:
The first one will have a short life time, because browsers can check if they are still the default browser. If the user launches their regular browser, it can bring up a message saying that they are no longer the default, and ask the user for permission to change this. And theny your application will no longer be the default.
The second one obviously is a very bad idea because to do so, your application would have to modify the Dropbox client application.
Note that the first sentence in the related Dropbox documentation says:
Never handle user login and password information.
Core API best practices, section one: User authorization
Addition: note that the Dropbox authentication uses the default browser for a reason: the browser not only displays a login form, it also allows the user to see the TLS (transport layer security, also known as SSL) certificate. Does TWebbbrowser give direct access to this information, so that the user can be sure your application does not capture and misuse the entered credentials?
Upvotes: 1