-
Notifications
You must be signed in to change notification settings - Fork 320
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
InvalidIdTokenError due to line break in "aud". Looks like a bug #487
Comments
It turns out that having cert = credentials.Certificate("/google-app-creds.json")
firebase = initialize_app(cert) instead of firebase = initialize_app() fixes the issue. It still seems like a bug to me. |
Check the Edit: I misread. The project ID in the service account is correct. But the project ID auto-discovered in the pod contains some invalid character or spaces. How is the project ID discovered in your pod? Does it have the Google metadata server or is it via an environment variable like |
I'm not sure actually. I just did |
I'm not familiar with the minikube addon. You can run the following snippet to see the project ID discovered by the SDK.
Can you share the output of the above? If the above output indeed contains any special characters, then you will need to dig a bit deeper into the minikube addon and see how it exposes the project ID to the SDK. |
Indeed that is the issue > print(f"Project ID: {repr(app.project_id)}")
Project ID: 'dev-plx\n' You suspect the minikube addon to be the sinner here? |
That would be my guess. Or it's an issue in the https://github.com/googleapis/google-auth-library-python library, although I doubt it. To be certain can you also try running the following command in a shell and see what the output looks like? gcloud config config-helper --format json Also check either |
It seems that the issue has been fixed in PR in the minikube repo. |
Describe your environment
Describe the problem
I have deployed a FastAPI application in minikube which exposes an endpoint that uses
auth.verify_id_token
. When I run that I get the following errorIt looks like there is an issue with
\n
/ line breaks.Steps to reproduce:
I'm using
minikube addons enable gcp-auth
to authenticate my pod. I'm afraid its quite complicated to create a small reproducible example but maybe someone can identify the issue just from this?The text was updated successfully, but these errors were encountered: