Skip to content
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

Bug: Firebase Notification Channel POST https://oauth2.googleapis.com/token resulted in a 400 Bad Request` invalid JWT #127

Open
sts-ryan-holton opened this issue Aug 31, 2021 · 0 comments

Comments

@sts-ryan-holton
Copy link

sts-ryan-holton commented Aug 31, 2021

Hi, i've recently implemented the Laravel Firebase Notifications into my Laravel 8 project. It was working initially upon deployment after configuring my credentials, but now after the weekend I've got loads of failed jobs in my database (jobs are set up in my project to dispatch notifications through my channels) whereby the error is relating to an invalid grant for the token endpoint on Google?

I never configured any JWTs in the set up of the Laravel notification channel other than downloading a service account JSON file from Firebase and simply using JQ to put it into my env like this...

FIREBASE_CREDENTIALS='{"type":"service_account","project_id": ... }'
FIREBASE_DATABASE_URL=https://MYPROJECT-7aa08.firebaseio.com

How can i fix this error?

GuzzleHttp\Exception\ClientException: Client error: POST https://oauth2.googleapis.com/token resulted in a 400 Bad Request response:
{"error":"invalid_grant","error_description":"Invalid JWT: Token must be a short-lived token (60 minutes) and in a reaso (truncated...)
in /var/www/project-beacon-api/shared/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:

My Default GCP resource location in Firebase is set to europe-west2

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

No branches or pull requests

1 participant