I am building an electron app which has a feature that allows users to open websites from within the electron app. All websites open with no problem except Google websites like gmail.com or youtube.com. The problem is during the login page of the Google website. Google displays the following error page:
I know Google started blocking embedded browsers because embedded browsers might hide the address bar and there is a possibility of MITM attack. My app does not block the address bar. Anyways.. Google's alternative is to use the OAuth 2.0 flow for desktop apps but I am not trying to get access to the users data. All I am trying to do is allow users to login and access Google websites like how they would do in a browser.
What is the right way to accomplish this? I have looked everywhere and found some workarounds like changing the useragent string but I want to know what the "right way" to accomplish this is.