googleapis/google-api-ruby-client

get_account_info in google-apis-identitytoolkit_v3 raises HTTPClient::ConnectTimeoutError

hawkcookie opened this issue · 1 comments

I'm using rails 7.0.3 and ruby 3.1.1, and I deploy my app to fly.io(nrt Tokeyo region).

I am using google-apis-identitytoolkit_v3 to get user information for firebase authentication from ruby.

client = Google::Apis::IdentitytoolkitV3::IdentityToolkitService.new
client.authorisation = Google::Auth::ServiceAccountCredentials.make_creds(
          scope: 'https://www.googleapis.com/auth/identitytoolkit'
        ) # I put required variables for auth in .env.production.
account_request = Google::Apis::IdentitytoolkitV3::GetAccountInfoRequest.new(id_token: token)
account = client.get_account_info(account_request)

The above code works fine and gets the user information in the development environment, but I get a HTTPClient::ConnectTimeoutError on get_accout_info in the production environment.

Why is this?

As a test, I deployed the same application to heroku and tried it and it works fine.