From 8dc008107019ba62d1fce8265cb9f4a737b1a85d Mon Sep 17 00:00:00 2001 From: Nicolas Garnier Date: Fri, 12 May 2017 20:23:09 -0700 Subject: [PATCH] Some minor fixes in authorized-https-endpoint README Change-Id: I7048c89d278b51da1c8e4f9c96063e84bc78deb7 --- authorized-https-endpoint/README.md | 2 +- authorized-https-endpoint/functions/index.js | 1 - fcm-notifications/public/firebase-messaging-sw.js | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/authorized-https-endpoint/README.md b/authorized-https-endpoint/README.md index d6c9a61..a4d627c 100644 --- a/authorized-https-endpoint/README.md +++ b/authorized-https-endpoint/README.md @@ -27,7 +27,7 @@ This sample comes with a web-based UI for testing the function. To test it out: 1. Deploy your project using `firebase deploy` 1. Open the app using `firebase open hosting:site`, this will open a browser. - 1. Sign in the web app in the browser using Google Sign-In and delete your account using the button on the web app. You should receive email confirmations for each actions. + 1. Sign in the web app in the browser using Google Sign-In and two authenticated requests will be performed from the client and the result will be displayed on the page, normally "Hello ". ## Contributing diff --git a/authorized-https-endpoint/functions/index.js b/authorized-https-endpoint/functions/index.js index 785f6ae..e2d0cba 100644 --- a/authorized-https-endpoint/functions/index.js +++ b/authorized-https-endpoint/functions/index.js @@ -29,7 +29,6 @@ const app = express(); // when decoded successfully, the ID Token content will be added as `req.user`. const validateFirebaseIdToken = (req, res, next) => { console.log('Check if request is authorized with Firebase ID token'); - console.log('headers', req.headers); if ((!req.headers.authorization || !req.headers.authorization.startsWith('Bearer ')) && !req.cookies.__session) { diff --git a/fcm-notifications/public/firebase-messaging-sw.js b/fcm-notifications/public/firebase-messaging-sw.js index 19b490b..484ec75 100644 --- a/fcm-notifications/public/firebase-messaging-sw.js +++ b/fcm-notifications/public/firebase-messaging-sw.js @@ -6,5 +6,3 @@ importScripts('/__/firebase/3.9.0/firebase-messaging.js'); importScripts('/__/firebase/init.js'); firebase.messaging(); - -