Skip to content

Commit 09a955d

Browse files
committed
add logging
1 parent bbfb5ad commit 09a955d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

firebase/functions/src/osm_auth.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ async function createFirebaseAccount(admin: any, osmID: any, displayName: any, a
240240

241241
// check if profile exists on Firebase Realtime Database
242242
const snapshot = await profileRef.once('value');
243+
functions.logger.log("Snapshot value:", snapshot.val());
243244
const profileExists = snapshot.exists();
244245

245246
// Save the access token to the Firebase Realtime Database.
@@ -281,8 +282,10 @@ async function createFirebaseAccount(admin: any, osmID: any, displayName: any, a
281282
const tasks = [userCreationTask, databaseTask];
282283

283284
if (profileExists) {
285+
functions.logger.log('Sign in to existing OSM profile');
284286
tasks.push(profileUpdateTask);
285287
} else {
288+
functions.logger.log('Sign up new OSM profile');
286289
tasks.push(profileCreationTask);
287290
}
288291

0 commit comments

Comments
 (0)