Skip to content
New issue

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

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

Already on GitHub? # to your account

Deprecated OAuth out-of-band (oob) flow #420

Open
fadeltd opened this issue May 25, 2022 · 3 comments
Open

Deprecated OAuth out-of-band (oob) flow #420

fadeltd opened this issue May 25, 2022 · 3 comments

Comments

@fadeltd
Copy link

fadeltd commented May 25, 2022

OAuth out-of-band (oob) flow will be deprecated

https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html

redirect_uri: 'urn:ietf:wg:oauth:2.0:oob'

New OAuth usage will be blocked for the OOB flow

image

Can we migrate to an alternative flow? https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback

@septianmalela
Copy link

Hi, i think the error redirect url not valid, i have same issue with you and i solved the issue.

maybe the step link this

  1. you create new routes for get callback response from google, maybe like this get 'google_drive_response', to: 'public_page#google_drive_response'
  2. you register url on google console
    image
  3. change redirect url change to routes callback response, for example like this redirect_uri: "http://localhost:3000/google_drive_response/"

i hope you issue is solved, because me solved the issue:))

@koos
Copy link

koos commented Aug 7, 2023

Also waiting for a proper solution on this. @gimite ?

@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```

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

No branches or pull requests

3 participants