Questions tagged [google-auth-library]
81 questions
23
votes
7 answers
The incoming JSON object does not contain a client_email field
I'm trying to create a firebase cloud function. So I would to run my firebase cloud function locally.
But it do not work how to setup authentication.
I have installed firebase tools : https://firebase.google.com/docs/functions/local-emulator
I've…

Shining
- 425
- 6
- 20
19
votes
6 answers
Google Auth migrating to androidx: SignInHubActivity does not implement Lifecycle
After the migration to AndroidX i'am facing this the following issue with the Google Auth lib:
On Android 9 API 28:
java.lang.IncompatibleClassChangeError: Class 'com.google.android.gms.auth.api.signin.internal.SignInHubActivity' does not implement…

4bottiglie
- 523
- 7
- 22
9
votes
2 answers
How do you use Google API getRequestHeaders() to get an OAuth2 access token?
I'm using the googleapis npm library to authorize using OAuth2 to access my Gmail account to send emails. I am using the following code (TypeScript) to do that:
const oAuth2Client = new google.auth.OAuth2(
googleConfig.clientId,
…

derefed
- 679
- 5
- 17
8
votes
2 answers
Enable APIs using serviceusage API with a service account
I want to create an automatic deployment of GCP for clients.
In order to do that, I have opened a page for them to login with google, and then enabled the IAM API and the Service Usage API.
Then I have created a service account that I want to use…

Elvira Gandelman
- 327
- 1
- 4
- 14
7
votes
1 answer
java.io.IOException: Error reading credentials from stream, 'type' field not specified
I am trying to authenticate a java app into the google photos api, using my own account, which doesn't support service_account as per documentation. The problem is that the file generated by the google-console for OAuth2 authentication doesn't…

Stela
- 71
- 1
- 1
- 2
6
votes
3 answers
How to log into Google Cloud Storage from a python function?
I am new to google cloud storage and I try to set up a function that downloads a blob once a day.
At the moment I am working in my Jupyter Notebook but finally, the code will run in an Azure Function. I am struggling with setting up the client that…

Pet
- 251
- 1
- 3
- 14
4
votes
1 answer
Google Sheets Python google.auth.exceptions.RefreshError
I have a small python bot that reads a Google sheet and proceeds to send that information to a Discord server when prompted by the user. I haven't used it in 1-2 months and now it doesn't work. It seems to be throwing the error on the call to the…

Chris Hegel
- 41
- 3
4
votes
2 answers
Trying to access GSuite Admin account users gives '401 - Login required'
I have setup a new project to access my GSuite account users. When I run my code it gives 401 - 'Login required'.
I have granted 'Domain wide authority' to the account with the required scopes.
The code that I am using is:
def authorize
authorizer…

startupsmith
- 5,554
- 10
- 50
- 71
3
votes
2 answers
Why is the requests module not installed according to the google-auth library?
I'm using the Google Calendar API to fetch some events and I'm using a venv to house all the packages required, and I've run into a simple problem: google.auth.transport.requests can't function correctly, citing the requests package is not…

ankurbohra04
- 432
- 5
- 12
3
votes
1 answer
How do you authenticate a user for PhotosLibraryClient in an Android app with no backend server
Previously, I was using the library:
com.google.apis:google-api-services-photoslibrary:v1-rev1-1.23.0
But I've been informed that wasn't meant to be released, and it has some errors. So I've tried switching over the correct…

richjhart
- 336
- 3
- 12
3
votes
0 answers
Google API on Published Electron app: gapi.auth2.ExternallyVisibleError: Invalid cookiePolicy
I have a React + Electron app using Google API to authenticate and get a list of calendar events.
The API script is being loaded on the head of my index.html and initialised on my App.js like so:
// Initializes the API client library and sets up…

Matt Costa
- 233
- 1
- 10
3
votes
0 answers
Upgrading a Python Script from oauth2client to google-auth
I would like to upgrade the following code from oauth2client to google-auth. Yes, this code does work and is a copy paste from the Google demo on their site.
from __future__ import print_function
from googleapiclient.discovery import build
from…

Eric Greene
- 31
- 4
2
votes
0 answers
GoogleAuth.OAuth2Client.verifyIdToken() Exception: [No pem found for envelope] for a specific account on a specific device
I'm getting the following exception for a specific account on a specific physical device in release only. I'm not sure how to continue debugging the issue.
In an Android app (Kotlin, Jetpack Compose)
-- I'm getting a Google account idToken using…

user21876734
- 21
- 3
2
votes
2 answers
TypeError: jwt.split is not a function at OAuth2Client.verifySignedJwtWithCertsAsync Node package: google-auth-library
The react-google-login from the client react app sends the response back to the Nodejs server with a post request-
client code -
import axios from 'axios';
import React, { Component } from 'react';
import GoogleLogin from…

Saheel Sapovadia
- 2,755
- 3
- 11
- 22
2
votes
1 answer
minifyEnabled in Android app breaks GoogleApi calls
TLDR - Android app has problems with Google API when minifyEnabled is true.
There is an Android app that uses Google API for creating events and google meetings. I use pretty standard tools for working with those APIs - GoogleAuthorizationCodeFlow,…

Alpha900i
- 21
- 4