Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Oauth out-of-band (OOB) Flow Deprecated Oct 3 #424

Open
dbenton9 opened this issue Sep 8, 2022 · 12 comments
Open

Google Oauth out-of-band (OOB) Flow Deprecated Oct 3 #424

dbenton9 opened this issue Sep 8, 2022 · 12 comments

Comments

@dbenton9
Copy link

dbenton9 commented Sep 8, 2022

In lieu of the new google security updates, I'm assuming this google_drive gem will be affected because it uses OOB.

Is there going to be a way to work around this?

@JamJacques
Copy link

Any news of that issue ? Should we use from_credentials or from_access_token method to bypass the potential problem related to this release ?

@dbenton9
Copy link
Author

No news 😢

Regardless of from_credentials or from_access_token I don't think this gem will work because its based on OOB.

I was able to get an extension from google until Jan 31, 2023 to continue using OOB, I'm hoping my project will be mostly wrapped up by then and then I will no longer need this gem, but that doesn't help those who rely on it for ongoing projects.

@cwant
Copy link

cwant commented Oct 19, 2022

This is a work around that at least gets me up and running with some little scripts in the short term.
See this line here:
https://github.com/gimite/google-drive-ruby/blob/master/lib/google_drive/session.rb#L158

Change the value of the redirect_uri to 'http://localhost:1/'.

Run your code as usual, paste the URL into the browser. You will get an error in the browser after agreeing to the scopes, but the error will also contain the code you need to paste into your app.

I stole the idea from: https://stackoverflow.com/a/71331562

@cfgv
Copy link

cfgv commented Dec 7, 2022

No news 😢

Regardless of from_credentials or from_access_token I don't think this gem will work because its based on OOB.

I was able to get an extension from google until Jan 31, 2023 to continue using OOB, I'm hoping my project will be mostly wrapped up by then and then I will no longer need this gem, but that doesn't help those who rely on it for ongoing projects.

Hello, dbenton9 How did you get this extension?

@dbenton9
Copy link
Author

dbenton9 commented Dec 7, 2022

@cfgv I filled out this form.

@cfgv
Copy link

cfgv commented Dec 7, 2022

This is a work around that at least gets me up and running with some little scripts in the short term. See this line here: https://github.com/gimite/google-drive-ruby/blob/master/lib/google_drive/session.rb#L158

Change the value of the redirect_uri to 'http://localhost:1/'.

Run your code as usual, paste the URL into the browser. You will get an error in the browser after agreeing to the scopes, but the error will also contain the code you need to paste into your app.

I stole the idea from: https://stackoverflow.com/a/71331562

Does this work for anyone else? That is to say it lets authenticate and select the permissions, but when I fill the code it gets Signet::AuthorizationError: Authorization failure. Server message:

NOTE: I am doing the authentication from console

@Carpela
Copy link

Carpela commented Dec 7, 2022

Has anyone looked in detail at this as to whether the gem can be adapted?
I have a load of relatively tricky functionality and automation based on interacting and exporting google sheets using this. Would be an absolute pain to redo it.
I did adapt a gmail manipulation app once but remember finding some of google's security approaches pretty impenetrably overengineered.
Worth clarifying that my use case is very much a server side interaction with a service account. I don't need users to authenticate because the data belongs to my 'system'. (Though I guess I could pretend it was based on certain admin users, just seems like a massive pain for something that was working well.)

@cfgv
Copy link

cfgv commented Dec 9, 2022

Does anyone know of another library that does this?

@jgmontoya
Copy link

Have you guys found a working solution to this?

@dbenton9
Copy link
Author

Negative.

@koos
Copy link

koos commented Aug 7, 2023

Have the same problem here...

@koos
Copy link

koos commented Aug 7, 2023

Wouldn't it be a solution to replace:

https://github.com/gimite/google-drive-ruby/blob/55b996b2c287cb0932824bf2474248a498469328/lib/google_drive/session.rb#L158C1-L159C1

with

redirect_uri: config.redirect_uri

and just pass a 'dummy' redirect_uri in your method?
Something like this:

require 'google_drive'

require 'google_drive'

class GoogleDriveService

  attr_accessor :client_id, :client_secret, :redirect_uri, :refesh_token, :scope, :save, :scope, :refresh_token

  def initialize(client_id, client_secret, redirect_uri)
    @client_id = client_id
    @client_secret = client_secret
    @redirect_uri = redirect_uri
  end
  
  def create_session
    session = GoogleDrive::Session.from_config(self)
  end

end```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants