MicrosoftEdge / WebView2Feedback

Feedback and discussions about Microsoft Edge WebView2
https://aka.ms/webview2
452 stars 55 forks source link

Using Power BI Embedded, WebView2 shows Sign-In button each time we close and reopen the app #2541

Open jrodriguez-masao opened 2 years ago

jrodriguez-masao commented 2 years ago

Description Using Power BI Embedded, WebView2 shows login button each time we close and reopen the app There's no error messages. However, behavior is uncommon since when clicking on Sign-In it will login, but if we ever change the page or close and re-open the app, the Sign-In button will appear again.

Version SDK: 1.0.1245.22 Runtime: Microsoft Edge WebView2 Runtime 102.0.1245.44 Framework: UWP OS: Windows 10 19044.1586

Repro Steps

  1. Have a PowerBI instance
  2. Open PowerBI embedded link with WebView2
  3. Log-In button shows each time a new page is open or after app is restarted

Screenshots image

Additional context The link for Power Bi was obtained by opening a "Report" then clicking File > Embed > Website or Portal image

david-risney commented 2 years ago

When you say you click the 'Sign-In' button it logs in, you mean without prompting you for username and password? That is, it has cached your username and password and you get logged in without entering that info, but for some reason you see the 'Sign-In' button first?

When you take that same URI and open it in Edge browser and then totally close all Edge browser windows and reopen Edge to that same URI do you get the same 'Sign-In' button behavior or something different?

jrodriguez-masao commented 2 years ago

That is, it has cached your username and password and you get logged in without entering that info, but for some reason you see the 'Sign-In' button first?

That is correct.

The first time the app is installed (and the first time we open the page containing the WebView2), when we click on Sign-In button it will ask for a mail and password in a pop-up view.

Then, if we have signed-in successfully, all the times after that whenever we reopen the page with the WebView2, the Sign-In button will show again, but this time won't ask for mail and password when clicked. It will only navigate to the requested page once clicked.

jrodriguez-masao commented 2 years ago

When you take that same URI and open it in Edge browser and then totally close all Edge browser windows and reopen Edge to that same URI do you get the same 'Sign-In' button behavior or something different?

I do get the exact same behavior than in the app. 'Sign-In' button shows, and if I have already signed-in once, when clicked it will load directly the targeted page.

david-risney commented 2 years ago

I do get the exact same behavior than in the app.

If the behavior in WebView2 matches the behavior in the Edge browser, then this behavior is expected. Are there other URIs you can use or other options provided by the website?

jrodriguez-masao commented 2 years ago

image

https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-embed-secure#considerations-and-limitations

This seems to answer the question to the problem