firebase / firebase/functions-samples

Possible outdated Cloud Function URLs in google-sheet-sync sample

Open
#446 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.2k
Forks
3.8k
Avg merge
3d 23h
Merged PRs (30d)
1

Description

**Sample name or URL where you found the bug**
google-sheet-sync

**Failing Function code used (including require/import commands at the top)**
line 50 of index.js authgoogleapi
also steps 6, 12 and 13 of the readme

**Steps to set up and reproduce**
follow all instructions of the readme
on step 12 when I go to https://{YOUR-PROJET-ID}.firebaseapp.com/authgoogleapi I get a 404

### Expected behavior
going to https://{YOUR-PROJET-ID}.firebaseapp.com/authgoogleapi should set an access token used for writing to Google Sheets

### Actual behavior
instead it gives me a 404

I think the issue is that Firebase has changed the URLs where they host Cloud Functions. After I changed line 36 of index.js to:
`const FUNCTIONS_REDIRECT = 'https://us-central1-${process.env.GCLOUD_PROJECT}.cloudfunctions.net/oauthcallback';`
and updated my authorized redirect URI in the Google APIs console everything worked.

Similarly, steps 12 and 13 should be to visit:
https://us-central1-{YOUR-PROJET-ID}.cloudfunctions.net/authgoogleapi
https://us-central1-{YOUR-PROJET-ID}.cloudfunctions.net/testsheetwrite

Maybe I've configured things incorrectly and the readme is correct, but just thought I'd point this out in case it is a bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.