minbrowser / min

A fast, minimal browser that protects your privacy
https://minbrowser.org/
Apache License 2.0
7.99k stars 709 forks source link

Can't Sign Into Gmail #868

Open Bundito14 opened 4 years ago

Bundito14 commented 4 years ago

I would love to use this browser as an everyday alternative, however, it won't let me sign into my Google account due to "security reasons." Is there a workaround to this?


(from @PalmerAL):

For anyone else having this issue, please post the following:

  1. Do you have 2FA enabled?
  2. OS
  3. Approximate location (if you're willing to share)

If you're running the latest version of Min, try enabling the "use a custom user agent" in the Min preferences, and pasting the following in the user agent field:

Mozilla/5.0 (Windows NT 10.0; WOW64; rv:74.0) Gecko/20100101 Firefox/74.0

Once you do this, you'll need to restart Min before signing in.

Please let us know whether this works for you.

PalmerAL commented 4 years ago

Can you post a screenshot of the exact error you're getting? Multiple people have reported this in the past few weeks (1, 2), but I'm able to sign in without any issues, so I'm not sure why this is happening.

ghost commented 4 years ago

In my case I can login my first account but after this I can't add any another accounts.

Couldn't sign you in

You are trying to sign in from a browser or app that doesn't allow us to keep your account secure.

Try using a different browser. Learn more
PalmerAL commented 4 years ago

This looks to be the same as this issue unfortunately: https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/issues/3545. I've also tried this with two accounts, and I can log in to both simultaneously, so it appears to only be applied to some subset of people.

@lee-yunseok Assuming you're running min with electron 7 (which you should be if you used the default version from npm), can you try this?

ghost commented 4 years ago

@PalmerAL Where is the Chromium version string?

PalmerAL commented 4 years ago

@lee-yunseok It's the part of the string that starts with "chrome", for example:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.94 Safari/537.36

ghost commented 4 years ago

@PalmerAL Sorry, wrong question. Where is user agent?

PalmerAL commented 4 years ago

@lee-yunseok For getting the user agent, use the link above; once you've modified it, delete the contents of UASwitcher.js in (/main), and replace it with this:

app.userAgentFallback = <the new user agent>
ghost commented 4 years ago

@PalmerAL It doesn't work for my RPi.

PalmerAL commented 4 years ago

Some more reports of this happening in other browsers: https://old.reddit.com/r/kde/comments/e7136e/google_bans_falkon_and_konqueror_browsers/

Supposedly it works if you use a Firefox user agent.

ghost commented 4 years ago

@PalmerAL Okay it failed on my RPi, also edited UA with cURL but that didn't work either when I using original Mozilla/5.0 (X11; Linux aarch64). but I got a hint from there, set user agent to Firefox - Windows in the Inspect Element and it work. Don't need to edit UASwitcher.js.

@Bundito14 I don't know what OS you use, but how about trying this?

drumber13 commented 4 years ago

Я нашел решение проблемы. Могу ли я написать его здесь, чтобы гугл увидели и не пофиксили?

PalmerAL commented 4 years ago

@Malyiy I don't think that's something to worry about, although I can't say for sure.

(using Google Translate):

Я не думаю, что это о чем-то беспокоиться, хотя я не могу сказать наверняка.

drumber13 commented 4 years ago

@PalmerAL Мы можем списаться в чате каком-то? Я скажу как, а там уже ты разберешься :)

PalmerAL commented 4 years ago

@Malyiy You can email me: 280953907a@zoho.com.

LouieTian0209 commented 4 years ago

@PalmerAL For me I can only sign into the first account, and all other sign in attempts after that will get denied due to "security reasons". I'm thinking maybe it has something to do with 2-step authentication cuz the first account that I can sign in doesn't have 2-step authentication whereas all other accoutns I have have that feature enabled. Not guaranteed, just my observation.

PalmerAL commented 4 years ago

I've added a user agent option to the settings page in f427d200cd5fb0ba1249f4cbc289a3c3d4895ca9, which should make it somewhat easier to work around this.

ghost commented 4 years ago

I've added a user agent option to the settings page in f427d20, which should make it somewhat easier to work around this.

This has solved my issue with google services. Will continue to use with everything and report anymore issues.

whiterock commented 4 years ago

I have the same issue. In google chrome I googled "my user agent" which showed: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 Putting this in the custom user agent in the preferences in min and restarting, I unfortunately still get the message:

Screenshot 2020-05-11 at 13 49 53

Do I maybe need to clear some cache? If so, how?

PalmerAL commented 4 years ago

No Chrome user agent works (even if it's identical); you have to use a Firefox one.

whiterock commented 4 years ago

No Chrome user agent works (even if it's identical); you have to use a Firefox one.

Ah thank you, using the firefox agent worked. Very strange, I wonder why that is ...

ItsJamie9494 commented 4 years ago

I'm guessing Google has a different verification method for Chrome user agents

FcoMarcosMAbreu commented 4 years ago

Just contributing with the dicussion...

I'd tried the latest Google Chrome's user agent and didn't work.

So I did set user agent with the latest Mozilla Firefox's user agent. Now I can log into Google.

PalmerAL commented 4 years ago

@FcoMarcosMAbreu Can you also try the Edge user agent?

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Edg/83.0.478.37

I'm hoping to be able to enable that one by default (#893)

ebrensi commented 4 years ago

The default settings work great for me in Pop_OS! 20.04. I have gmail open in a tab right now.

PalmerAL commented 4 years ago

If changing the user agent ever stops working, someone on Twitter mentioned that enabling the "less secure app access" option in the Google account settings also makes it possible to sign in.

PalmerAL commented 4 years ago

At least one person has reported to me on Twitter that the Edge user agent doesn't work, but the Firefox one does, so you could try that if you're still experiencing this issue in 1.16.

Painadath commented 3 years ago

I was able to login a few days ago but now it is not allowing me to sign in

marizmelo commented 3 years ago

Same problem here, it would be good if we could log-in without need of another browser to setup the lower security (in fact it would be better if we had not to do that at all). Trying to use this browser as the main browser in my OS distro, but without being able to access Google services I can't do that.

NOTE: the custom user agent does not work here

Google's announcement: https://www.zdnet.com/article/google-bans-logins-from-embedded-browser-frameworks-to-prevent-mitm-phishing/

maisonhai3 commented 3 years ago

This looks to be the same as this issue unfortunately: MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-#3545. I've also tried this with two accounts, and I can log in to both simultaneously, so it appears to only be applied to some subset of people.

@lee-yunseok Assuming you're running min with electron 7 (which you should be if you used the default version from npm), can you try this?

  • Go here and find your current user agent.
  • Replace the Chromium version string in the user agent with "78.0.3904.97" or "78.0.3904.108".
  • In UASwitcher.js, set newUserAgent to the string from step 2.

This is no longer working in August 2021.

If it is unable to log in Google services, I can't use min as the main browser.

PalmerAL commented 3 years ago

@marizmelo @maisonhai3 Two questions:

  1. Can you try it with this user-agent:

Mozilla/5.0 (Windows NT 10.0; WOW64; rv:91.0) Gecko/20100101 Firefox/91.0

  1. Is the error message identical to the screenshots in this thread?
Painadath commented 3 years ago

What about raspberry pi 64bit? Which user agent should I use?

PalmerAL commented 3 years ago

Try Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

Or if you have Firefox installed, open this in Firefox: https://duckduckgo.com/?q=user+agent&ia=answer and use that one.

Painadath commented 3 years ago

Made it to sign in but is there any way to get working the widewine with any useragent on raspbian64bit?

The-Compiler commented 3 years ago

without need of another browser to setup the lower security (in fact it would be better if we had not to do that at all)

As the maintainer of another project affected by this: Changing the user agent doesn't lower your security in any way at all. Google essentially just blocks everything Chromium-like which isn't actually one of the big couple of browsers they care about.

ghost commented 3 years ago

@maisonhai3 Go to Preferences > Use a custom user agent, and type

Mozilla/5.0 (Windows NT 10.0; WOW64; rv:77.0) Gecko/20100101 Firefox/77.0

Then close Min and re-run, sign-in with Google. Above firefox revision 77 with Windows will work in the latest Min.

PalmerAL commented 3 years ago

@lee-yunseok Does it also work if you use the latest Firefox version (91)?

@Painadath It's great that signin works! We can make that the default UA for Google sign in assuming it works for everyone.

It's not really possible to get widevine support, see https://blog.samuelmaddock.com/posts/the-end-of-indie-web-browsers/.

PalmerAL commented 3 years ago

PR to use the Firefox UA: #1716. If someone could test that and confirm that they can sign in using that branch, that would be great.

ghost commented 3 years ago

@PalmerAL Does it also work if you use the latest Firefox version (91)?

Yes it working.

Painadath commented 3 years ago

PR to use the Firefox UA: #1716. If someone could test that and confirm that they can sign in using that branch, that would be great.

But it need different user agent for each os and there is a lot of open source drm repo in GitHub can't we use them?

PalmerAL commented 3 years ago

But it need different user agent for each os

Yes; the code in the PR picks the right user agent depending on your OS.

there is a lot of open source drm repo in GitHub can't we use them?

The only one I know of is: https://github.com/castlabs/electron-releases. It may be possible to use that, but I don't know too much about the licensing. That also makes us dependent on them to release Electron builds in a timely manner, which isn't ideal.

This is off-topic for this issue anyway; see #641.

Painadath commented 3 years ago

@PalmerAL here a project whcih uses electron+widvine can we use something from it to add support to widvine? https://github.com/oscartbeaumont/ElectronPlayer

PalmerAL commented 3 years ago

It's not a technical issue, it's a licensing issue. And if you read "the pain of Widevine" section in that link, I don't think they've figured that out.

aquaspy commented 2 years ago

I found the best workarround I guess, for some reason, seems like doing the login at google.com works but not at gmail.com, youtube.com etc.

So, just type google.com and login there. You will be logged on all google things then :)

kmgrime commented 2 years ago

Still have this issue in 1.22.1

December 2021

aquaspy commented 2 years ago

Hmm yeah, I think it is actually impossible to fix this one... It depends on google :cry:

aaron1028923 commented 2 years ago

Hey disable use custom user agent. Inspect element Toggle device toolbar Select iPhone X Then login

flightmansam commented 2 years ago

A little side note for Mac M1 users...

I could only get it working by reading the user agent from my firefox browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0 and changing Intel to Arm

Note for 2FA, didn't work for trusted device? Had to use an authenticator app instead.

alminisl commented 2 years ago

For me the "Inspect element" selectd Iphone device and then login worked.. for now..

iambudi commented 2 years ago

I have fresh install min on a new mac and having this sign in issue as well. There might be a way to let google identify min or electron based browser as a secure browser.

Temporary workaround:

  1. Sign into google account in different browser (like Safari).
  2. Go to manage account and choose Security
  3. Set Less secure app access to ON
  4. Go back to min, new tab and sign into google
  5. After successfull sign in, set step number 3 back to OFF
ronilaukkarinen commented 2 years ago

@iambudi It seems this settings can't be used if 2FA is on...