Open yangzhongke opened 1 year ago
I don't think even changing UserAgent will allow login with CEF:
Starting in June 2019 Google will block logins from CEF based browsers to Google Services, this includes Gmail, Drive, Docs, see https://security.googleblog.com/2019/04/better-protection-against-man-in-middle.html?m=1 for further discussion see https://groups.google.com/a/chromium.org/d/msg/embedder-dev/STyM5ZNTHMM/POj1v_cqBgAJ
WebView2 did not work? https://github.com/rocksdanister/lively/wiki/Web-Player#webview2-microsoft-edge
Thanks for your prompt reply. Without using UserAgent, how does Google tell if the webpage is running on CEF-based browser?
It works with WebView2 with the fake UserAgent:
Oh alright.
For implementation I recommend adding custom configuration file support for now:
https://github.com/rocksdanister/lively/issues/706
This way many more properties can be added immediately without the overhead of UI implementation.
Add a new path for webplayer config json location: https://github.com/rocksdanister/lively/blob/core-separation/src/Lively/Lively.Common/Constants.cs
Then you can check if the file exists in webview player and load.
I don't think even changing UserAgent will allow login with CEF:
You have to be a little careful in which useragent you choose, generally should work from all reports. Use a Firefox useragent and you may get optimised code that won't run in chromium.
When I tried to log in to my Google account on the web page, the following error showed:![image](https://user-images.githubusercontent.com/13821363/201251207-d266fd1b-a1fb-49a7-9c35-39fcdffe6e02.png)
According to my research, the reason is that the default UserAgent of CEFSharp or WebView2 is considered unsafe by Google. This problem can be solved by customised UserAgent.
I'd like to contribute the code. I propose adding an editable Combobox for the "UserAgent" field.