Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

Commit b006d8b

Browse files
committed
fix: avoid underscore in fb function names
1 parent c259519 commit b006d8b

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

firebase/firebase.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
"function": "osmAuth-token"
2323
},
2424
{
25-
"source": "/redirect_web",
26-
"function": "osmAuth-redirect_web"
25+
"source": "/redirectweb",
26+
"function": "osmAuth-redirectweb"
2727
},
2828
{
29-
"source": "/token_web",
30-
"function": "osmAuth-token_web"
29+
"source": "/tokenweb",
30+
"function": "osmAuth-tokenweb"
3131
}
3232
]
3333
},

firebase/functions/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ admin.initializeApp();
88
// all functions are bundled together. It's less than ideal, but it does not
99
// seem possible to split them using the split system for multiple sites from
1010
// https://firebase.google.com/docs/hosting/multisites
11-
import {redirect, token, redirect_web, token_web} from './osm_auth';
11+
import {redirect, token, redirectweb, tokenweb} from './osm_auth';
1212
import { formatProjectTopic, formatUserName } from './utils';
1313

1414
exports.osmAuth = {};
@@ -23,12 +23,12 @@ exports.osmAuth.token = functions.https.onRequest((req, res) => {
2323
token(req, res, admin);
2424
});
2525

26-
exports.osmAuth.redirect_web = functions.https.onRequest((req, res) => {
27-
redirect_web(req, res);
26+
exports.osmAuth.redirectweb = functions.https.onRequest((req, res) => {
27+
redirectweb(req, res);
2828
});
2929

30-
exports.osmAuth.token_web = functions.https.onRequest((req, res) => {
31-
token_web(req, res, admin);
30+
exports.osmAuth.tokenweb = functions.https.onRequest((req, res) => {
31+
tokenweb(req, res, admin);
3232
});
3333

3434
/*

firebase/functions/src/osm_auth.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const redirect = (req: any, res: any) => {
101101
});
102102
};
103103

104-
export const redirect_web = (req: any, res: any) => {
104+
export const redirectweb = (req: any, res: any) => {
105105
const oauth2 = osmOAuth2ClientWeb();
106106

107107
cookieParser()(req, res, () => {
@@ -233,7 +233,7 @@ export const token = async (req: any, res: any, admin: any) => {
233233
};
234234

235235

236-
export const token_web = async (req: any, res: any, admin: any) => {
236+
export const tokenweb = async (req: any, res: any, admin: any) => {
237237
const oauth2 = osmOAuth2ClientWeb();
238238

239239
try {
@@ -244,7 +244,7 @@ export const token_web = async (req: any, res: any, admin: any) => {
244244
);
245245
functions.logger.log('Received state:', req.query.state);
246246
// FIXME: For security, we need to check the cookie that was set
247-
// in the /redirect_web function on the user's browser.
247+
// in the /redirectweb function on the user's browser.
248248
// However, there seems to be a bug in firebase around this.
249249
// https://github.com/firebase/firebase-functions/issues/544
250250
// and linked SO question

0 commit comments

Comments
 (0)