min: Can't Sign Into Gmail

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.

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 2
  • Comments: 82 (1 by maintainers)

Most upvoted comments

For (Intel) Mac users,

I got this working by removing Chrome from my user agents list.

  1. Google “my user agent”.
    1. In my case, my user agent was:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.174 Safari/537.36.
    2. Then I removed Chrome from the list: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36
  2. Go to Preferences > Use a custom user agent, and paste it there.

Now you should be able to sign in to your google account

I figured it out. I didn’t know anything about userscripts in Min. But now I do. 😃 I created one with this code and it worked. Thanks!

The current approach to solving this issue is wrong and should not be considered. We should not be setting the Chrome user agent to a different browser such as Firefox. Doing so can give unintended consequences as it is easily distinguishable. The true foolproof solution comes from patching navigator.userAgent AND navigator.appVersion to remove the subversions.

Be sure that this script executes before Google’s. Looking forward to hearing if this worked for you.

    const reg = /[0-9]+\.[0-9]+ Safari/;
    const patchedUserAgent = navigator.userAgent.replace(reg, "0.0 Safari");
    const patchedAppVersion = navigator.appVersion.replace(reg, "0.0 Safari");
    Object.defineProperty(navigator, "userAgent", {
      get() {
        return patchedUserAgent;
      },
      enumerable: true,
      configurable: true,
    })
    Object.defineProperty(navigator, "appVersion", {
      get() {
        return patchedAppVersion;
      },
      enumerable: true,
      configurable: true,
    })

I made it work using the most common user agent of Firefox from this site (user agent list is updated daily)

which is Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0

@PalmerAL It failed when using firefox. Now it also works with the default one by unticking the custom user agent.

This is no longer work on latest update (Mac Version). Should use the custom one. Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/608.4.8 (KHTML, like Gecko) Version/16.4 Safari/608.4.8

Had the same problem today, the default user agent did not work, I used Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36 And it works

interestingly I have the message Screenshot 2023-10-09 at 08 03 44

Also, I connected on brave at the same time and used gmail at the same time. I don’t know if it helped

This is my computer config at the moment:

Screenshot 2023-10-09 at 08 05 13

I’m not signing to gmail, but it’s the same issue. I go to here: StackOverflow AI Early Access, choose login using google account.

image

Previously i used user agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0 Using @louis-27 agent string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36

It worked.

Adding a match for *.google.com now has things working. Thank you for the help. Looking at the console log, I saw other google sites being hit and figured adding a wildcard was worth a try.

Thank you @devgocri, unfortunately for some reason this still does not work. I do have other userscripts working, but I can’t get the one to allow login to google accounts to work.

Hi! I turned off ad blocker and tracker blocking and then it allowed me to login to the browser. This worked for me. Maybe it is blocking something which google needs.

#868 (comment) I did manage to move across this problem, but it’s still a hack. @thommesborg

Hi Dan, tried it but won’t work.

Thanks for the suggestion!!

Confirmed, @louis-27’s solution works perfectly!

I came back to this issue only because hardware video acceleration is broken in both firefox and brave in my laptop and guess what works? Min! Switching this to be my default browser now!

For me the “Inspect element” selectd Iphone device and then login worked… for now…

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.

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

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

Yes it working.

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.

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.

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