WebView2Feedback
WebView2Feedback copied to clipboard
WebView2 Save password - support for password prompt in temporary windows
Hello,
I'm writing about the bug #2291 that has been closed but is still not working. When the form is submitted the login window is closed and there is no way to save the password. Is there any way to ask user to save password ?
@AlbertoCe I believe #2291 was for a different issue. This one sounds like the window that would normally display the UI is getting closed before the UI has a chance to show to prompt for saving the password. Do you have a sample app that reproduces this issue?
Hi @champnic , A sample app is included in the IdentityModel repository here: IdentityModel repository in the WpfWebView2 folder. Anyway I attached a modified sample project, that can be tested with user "[email protected]" and password "test" and, even if I try to keep the login window open, the webview2 control does not ask to save the password.
I tested creating a new Window with a WebView2 in a WPF app and navigated to that page, and the password info was correctly prompted and saved. I'm not familiar with exactly when the password saving logic kicks in, but I wonder if the use of the OidcClient Browser and potentially cancelling the navigation are short-circuiting the logic here.
I made some test with a new window and it seems that the problem is exactly what you said: the OidcClient browser window close before the save password prompt. Is there any way to detect if the save password dialog is opened and wait for the user to answer (just like the old WebView do) ?
I don't think we want the WebView2 to arbitrarily hold open windows that an app is trying to close, but I think it's reasonable to have a "PasswordPromptShowing" and "PasswordPromptClosed" set of events for an app to be able to control this. I'll open a new Feature Request for this on our backlog.
This also seems related to #2454 and we may explore combining them.
@champnic, great news ! Could I continue to monitor this thread to be kept informed about the feature ?
Of course!
Are there any news on this? This would really be very appreciated.
@AlbertoCe , did you find a good way to allow saving the password in the meantime? For our own app I can only think of very ugly ways to keep the webview2 open.
Hi @sbo1988, this issue is tagged as priority-low
. As stated in the readme:
priority-low
We have considered this issue and decided that we will not be able to address it in the near future. Developers are welcomed to provide justifications on this issue for us to revisit the prioritization.
Closing this issue as this feature request is not in our roadmap.