WebView2Feedback icon indicating copy to clipboard operation
WebView2Feedback copied to clipboard

WebView2 Save password - support for password prompt in temporary windows

Open AlbertoCe opened this issue 2 years ago • 7 comments

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 ?

AB#41237017

AlbertoCe avatar Aug 23 '22 09:08 AlbertoCe

@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?

champnic avatar Aug 23 '22 22:08 champnic

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.

WebView2.zip

AlbertoCe avatar Aug 24 '22 06:08 AlbertoCe

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.

champnic avatar Aug 24 '22 21:08 champnic

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) ?

AlbertoCe avatar Aug 25 '22 07:08 AlbertoCe

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 avatar Sep 07 '22 23:09 champnic

@champnic, great news ! Could I continue to monitor this thread to be kept informed about the feature ?

AlbertoCe avatar Sep 09 '22 11:09 AlbertoCe

Of course!

champnic avatar Sep 09 '22 21:09 champnic

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.

sbo1988 avatar Jun 19 '24 12:06 sbo1988

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.

victorhuangwq avatar Jun 19 '24 16:06 victorhuangwq

Closing this issue as this feature request is not in our roadmap.

nishitha-burman avatar Jul 12 '24 16:07 nishitha-burman