Open fadeltd opened 2 years ago
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
i hope you issue is solved, because me solved the issue:))
Also waiting for a proper solution on this. @gimite ?
Wouldn't it be a solution to replace:
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```
OAuth out-of-band (oob) flow will be deprecated
https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html
https://github.com/gimite/google-drive-ruby/blob/55b996b2c287cb0932824bf2474248a498469328/lib/google_drive/session.rb#L158
New OAuth usage will be blocked for the OOB flow
Can we migrate to an alternative flow? https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback