I've just used Express with Firebase Cloud Functions and made an endpoint.
app.get('/time', (req, res) => {
const date = new Date();
const hours = (date.getHours() % 12) + 1; // London is UTC + 1hr;
res.json({bongs: 'BONG '.repeat(hours)});
});
The endpoint is accessible publicly with the path:
https://<region>-<project-name>.cloudfunctions.net/app/time
where app is from entry source index.js:
exports.app = functions.region('asia-east2').https.onRequest(app);
However, it's not accessible with the path:
https://<project-name>.web.app/app/time
It requires me to grant the permission and select my Google account by default. How come? The endpoint is for public access.
Did I miss anything to setup and how to solve this problem?
If I don't use Express Framework, both the above 2 paths are accessible for public. (i.e. Call functions from your app, https://firebase.google.com/docs/functions/callable)
Thank you~
