LibreOffice access to Google Drive asks for authentication 6-digit pin

Just checking if this is still a problem? I cannot get the Google Drive connection to work as at May 2021, Libreoffice 7.1.2.2 (x64) on Windows 10. Am I doing something wrong, or just wasting my time trying?

Found that, depending on the characters in your username/password, they were not correctly encoded when talking to Google, so authentication failed (and the code then falls back to asking for a two-factor 6-digit pin but which you wouldn’t receive from Google, whether or not you have two-factor authentication enabled for your account). Should be fixed with https://gerrit.libreoffice.org/#/c/59986/ “Properly encode OAuth2 credentials” (on master towards LO 6.2, but there’s also backports to 6.0.x and 6.1.x planned; see that link for details).

@sberg Many thanks for the post. Have tried to answer this many times since it always worked for me but others seemed to continue with problems. Good to know where the problem is and that there is a fix coming.

ok thank you. But can you give me steps of what I need to do once I click on the link https://gerrit.libreoffice.org/#/c/59986/ I am totally not understanding what I need to do once I get to that page. Thank you in advance.

@sberg It seems not solved at this day. I just moved do 6.2 but nothing changed.

I just moved to 6.2 and get invalid device even though I deactivated 2 FA.

Beyond the issue with certain characters in your username/password (the fix of which should meanwhile have been rolled out to all relevant LibreOffice installations), there is apparently a further (as of yet unaddressed) issue that causes failures for some Google accounts but not for others. See https://github.com/tdf/libcmis/issues/22 “Failure logging into some Google Drive accounts, but not into others” for all the technical details (libcmis is the underlying software that LibreOffice uses to connect to Google Drive).

Again, what is confusing is that, due to how things are coded on the LibreOffice side, a failure to connect (for whatever reason) will typically bring up the 6-digit two-factor authentication dialog, whether or not you are actually using two-factor authentication. So when that dialog comes up when it shouldn’t, that actually means LibreOffice was unable to connect, for unclear reasons.

Still happening with Version: 6.2.5.2 (x64).
No 2FA allowed for my G account and the popup for 6d PIN is there.

It’s so strange that the staff does not solve.
it’s very very strange… in so many years
A so necessary service…
Some commercial stuff behind?
Some deal?

As this is posted as an answer, how does it answer the question? Please delete and post using add a comment.

“Staff” as you state are volunteers from around the globe who submit changes, on their own time, to the software. If there is no volunteer willing to make the change it remains open. You could submit the change if so inclined.

This sounds like the Google Drive account has been set up with Two Step Verification. For more info, see Google 2-Step Verification

If this answer helped you, please accept it by clicking the check mark :heavy_check_mark: to the left and, karma permitting, upvote it. If this resolves your problem, close the question, that will help other people with the same question.

Well, my account is set up with 2FA - but Google is not sending the authcode :-# (tested with LO5.2.5.1 openSuse & vanilla)

Same here. I, too, have 2FA set up on my account. Judging by the lack of comments on this topic, I am guessing that virtually no one uses “Save to Remote Location” in LO. That’s unfortunate. Maybe they don’t use it because they cannot find an answer to this problem (6-pin digit number).

Well, that is the issue. LibreOffice (or google drive authentication) behaves as if the two step verification is enabled for my account, while actually it is not.

Even worse. I have two step authentication, but I have the authenticator app. I get a message to which I am supposed to click “Yes It’ s Me” which has no effect. The authenticator app also has a 6 digit numerical code that has no effect as a password either. The remote files feature, while it would be nice to have seems to be severely broken and needs lots of love and care.

LibreOffice Version: 6.3.1.2 Build ID: libreoffice-6.3.1.2-snap1 on Ubuntu 18.10

I don’t use 2FA; Nevertheless Remote Files asks for a 6-digit pin and won’t connect with my username and password.

Just another dysfunctional feature from LibreOffice. Don’t suppose it’ll ever get fixed if any of the other bugs I’ve reported years ago are a guide.

I saw the ‘Open Remote File’ option today for the first time and decided to try it as I have files on Google Drive. I do have 2FA enabled so I was not surprised to get authentication from my phone but it does not provide me with a code. Instead it just asks me to confirm that I am logging in from another computer. As LibreOffice will not proceed without the code, even though the 2FA worked, I am stuck. Any suggestions?

@JoeH1 See my answer on this post. Has worked repeatedly for me.

thanks @Ratslinger this also worked for me :slight_smile:

Joe this worked for me until I enabled 2-step authorization. now get a “General Input.output error”