Hey, I was browsing on edge with google search engine in private window when I visited a website it showed a fake pop-up that my device has virus.
So, I closed the browser (it was showing to install something on the pop-up screen) but when I opened my browser again my Microsoft and Google accounts were automatically signed out and browser started like it is opening for the first time. (I had to sign in my accounts again)
I scanned my laptop with Windows Defender, but it didn't find any virus or anything.
So, what should I do now, and anyone knows why it sign out automatically?
Regarding the Edge browser starting like it was opening for the first time, this particular symptom could simply be due to the Microsoft Edge browser Feature update that was released May 5th, which like previous updates caused my browser to reset and display the initial tab and screens describing all of the new or recently added features it provides.
Though I don't know whether these updates typically cause the browser to logout of websites like Microsoft, it's possible this might have occurred due to updates in the security portions of the app, so that symptom might be explained by an update as well. The following URL is the release notes for this and previous updates to the Microsoft Edge Stable Channel (e.g., general release version).
Microsoft Edge release notes for Stable Channel | Microsoft Learn
Though your situation may have started with a malicious popup advertisement, it's entirely possible that the following set of events were simply related to a significant browser update release for Edge.
And since both Edge and Chrome are based on the same Chromium Open-source browser, it's also possible that Chrome might have been updated recently as well, since many of the major updates to the browser core trigger an update from both Microsoft and Google shortly after, with the individual updates to personal devices occurring over the next few days as Microsoft notes in that release document as well.
Rob