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

There is a work around…but you must have access to your Google Drive from within your computer’s directory system.

If you have, then you can ignore the seeming non-functionality of ‘Save Remote’ and instead simply select ‘Save As’ and locate the Google Drive directory as the destination for your saved file.

This is a two step/phase verification. You must provide your mobile number to Google for them to send you a SMS text message to your mobile phone in order for you to authenticate on the system. Either the number on your account is incorrect or the phone number does not accept SMS messages. You can set this up on multiple social sites such as Facebook, Intstagram, LinkedIn, etc. Which is a good idea to keep your accounts your own.

I gave Google my mobile number, and let turned on 2FA with it. It does not send the confirmation texts though. I also tried using Google Auth. I got it to prompt me for the auth code from Google Auth, when signing in to gmail on the desktop computer web browser. That confirms that it was 2FA was successfully turned on. When I try to save the file to the remote drive, LibreOffice says the drive is invalid. LibreOffice on Linux

Tried both Google Drive and OneDrive, got the same error “invalid device” on both. I don’t have time for this. Bye bye LibreOffice.

Just checking if this is still a problem? I cannot get the Google Drive connection to work as at May 2021, Libreoffice (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 “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 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 “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: (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: Build ID: libreoffice- 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.