diff --git a/authorized-https-endpoint/README.md b/authorized-https-endpoint/README.md index b70403914e..cf59b09d34 100644 --- a/authorized-https-endpoint/README.md +++ b/authorized-https-endpoint/README.md @@ -16,7 +16,6 @@ This sample comes with a simple web-based UI which code is in [public](public) d 1. Create a Firebase Project using the [Firebase Console](https://console.firebase.google.com). 1. Enable the **Google** Provider in the **Auth** section. 1. Clone or download this repo and open the `authenticated-https-endpoint` directory. - 1. Paste the Web initialization snippet from: **Firebase Console > Overview > Add Firebase to your web app** in the `public/index.html` where the `TODO` is located. 1. You must have the Firebase CLI installed. If you don't have it install it with `npm install -g firebase-tools` and then configure it with `firebase login`. 1. Configure the CLI locally by using `firebase use --add` and select your project in the list. 1. Install dependencies locally by running: `cd functions; npm install; cd -` diff --git a/authorized-https-endpoint/public/index.html b/authorized-https-endpoint/public/index.html index 66a12b4740..bcb36f566b 100644 --- a/authorized-https-endpoint/public/index.html +++ b/authorized-https-endpoint/public/index.html @@ -68,9 +68,9 @@

Authorized HTTP Function demo

- + + + diff --git a/authorized-https-endpoint/public/main.js b/authorized-https-endpoint/public/main.js index a7d523c175..0d301c6604 100644 --- a/authorized-https-endpoint/public/main.js +++ b/authorized-https-endpoint/public/main.js @@ -23,7 +23,7 @@ function Demo() { this.signOutButton = document.getElementById('demo-sign-out-button'); this.responseContainer = document.getElementById('demo-response'); this.urlContainer = document.getElementById('demo-url'); - this.helloFunctionUrl = 'https://us-central1-' + config.authDomain.split('.')[0] + '.cloudfunctions.net/authorizedHello/'; + this.helloFunctionUrl = 'https://us-central1-' + firebase.app().options.authDomain.split('.')[0] + '.cloudfunctions.net/authorizedHello/'; this.signedOutCard = document.getElementById('demo-signed-out-card'); this.signedInCard = document.getElementById('demo-signed-in-card'); diff --git a/email-confirmation/README.md b/email-confirmation/README.md index 8e49934e1c..fe40cc9e42 100644 --- a/email-confirmation/README.md +++ b/email-confirmation/README.md @@ -34,22 +34,21 @@ The function triggers on changes to `/users/$uid` and exits if there are no chan ## Setting up the sample -Set the `gmail.email` and `gmail.password` Google Cloud environment variables to match the email and password of the Gmail account used to send emails. For this use: - -```bash -firebase functions:config:set gmail.email="myusername@gmail.com" gmail.password="secretpassword" -``` - -This sample comes with a web-based UI for testing the function. To set it up: - - - Create a Firebase Project using the [Firebase Developer Console](https://console.firebase.google.com) - - Enable Google Provider in the [Auth section](https://console.firebase.google.com/project/_/authentication/providers) - - Import and configure Firebase in the `public/index.html` where the `TODO` is located - + 1. Create a Firebase Project using the [Firebase Console](https://console.firebase.google.com). + 1. Enable the **Google** Provider in the **Auth** section. + 1. Clone or download this repo and open the `email-confirmation` directory. + 1. You must have the Firebase CLI installed. If you don't have it install it with `npm install -g firebase-tools` and then configure it with `firebase login`. + 1. Configure the CLI locally by using `firebase use --add` and select your project in the list. + 1. Install dependencies locally by running: `cd functions; npm install; cd -` + 1. Set the `gmail.email` and `gmail.password` Google Cloud environment variables to match the email and password of the Gmail account used to send emails. For this use: + ```bash + firebase functions:config:set gmail.email="myusername@gmail.com" gmail.password="secretpassword" + ``` ## Deploy and test This sample comes with a web-based UI for testing the function. To test it out: - - Deploy your project using `firebase deploy` - - Open the app using `firebase open`, Sign in using Google Sign-In and subscribe/unsubscribe to the newsletter and you should receive email confirmations + 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. diff --git a/email-confirmation/main.css b/email-confirmation/main.css deleted file mode 100644 index a1afdd12a5..0000000000 --- a/email-confirmation/main.css +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -html, body { - font-family: 'Roboto', 'Helvetica', sans-serif; -} -.mdl-grid { - max-width: 1024px; - margin: auto; -} -.mdl-card { - min-height: 0; - padding-bottom: 5px; -} -.mdl-layout__header-row { - padding: 0; -} -#message-form { - display: flex; - flex-direction: column; -} -#message-form button { - max-width: 300px; -} -#message-list { - padding: 0; - width: 100%; -} -#message-list > div { - padding: 15px; - border-bottom: 1px #f1f1f1 solid; -} -h3 { - background: url('firebase-logo.png') no-repeat; - background-size: 40px; - padding-left: 50px; -} -#demo-signed-out-card, -#demo-signed-in-card, -#demo-subscribe-button, -#demo-unsubscribe-button, -#demo-subscribed-text-container, -#demo-unsubscribed-text-container { - display: none; -} -#demo-subscribe-button, -#demo-unsubscribe-button { - margin-right: 20px; -} \ No newline at end of file diff --git a/email-confirmation/public/index.html b/email-confirmation/public/index.html index 7c4cf01a30..54fb92fc3a 100644 --- a/email-confirmation/public/index.html +++ b/email-confirmation/public/index.html @@ -97,9 +97,10 @@

Very interesting website with Newsletter

- + + + + diff --git a/exif-images/README.md b/exif-images/README.md index 697724fde6..22191a2356 100644 --- a/exif-images/README.md +++ b/exif-images/README.md @@ -28,16 +28,19 @@ For example the metadata for the file at path `/1477402116302/mypic.jpg` will be This sample comes with a Function and web-based UI for testing the function. To configure it: - - Create a Firebase project on the [Firebase Console](https://console.firebase.google.com) - - Enable Anonymous sign in the Auth section - - Import and configure Firebase in the `index.html` where the `TODO` is located + 1. Create a Firebase Project using the [Firebase Console](https://console.firebase.google.com). + 1. Enable the **Anonymous** sign-in in the **Auth** section. + 1. Clone or download this repo and open the `exif-image` directory. + 1. You must have the Firebase CLI installed. If you don't have it install it with `npm install -g firebase-tools` and then configure it with `firebase login`. + 1. Configure the CLI locally by using `firebase use --add` and select your project in the list. + 1. Install dependencies locally by running: `cd functions; npm install; cd -` ## Deploy and test To test the sample: - - Deploy your project using `firebase deploy` - - Open the Deploy Web UI using `firebase open`, typically at the URL `https://.firebaseapp.com` - - Upload an image using the Web UI. - - You should see the metadata displayed below after a bit. + 1. Deploy your project using `firebase deploy` + 1. Open the app using `firebase open hosting:site`, this will open a browser. + 1. Upload an image using the Web UI. + 1. You should see the metadata displayed below after a bit. diff --git a/exif-images/public/index.html b/exif-images/public/index.html index 6fc319ee2a..e3ba53aff3 100644 --- a/exif-images/public/index.html +++ b/exif-images/public/index.html @@ -26,19 +26,6 @@ - - - -
@@ -73,6 +60,14 @@
Image Metadata:
+ + + + + + + + diff --git a/fcm-notifications/README.md b/fcm-notifications/README.md index 0fa96f5cf6..5d17d1e176 100644 --- a/fcm-notifications/README.md +++ b/fcm-notifications/README.md @@ -53,9 +53,12 @@ The function triggers every time the value of a follow flag changes at `/followe This sample comes with a web-based UI for testing the function. To test it out: - - Create a Firebase Project using the [Firebase Developer Console](https://console.firebase.google.com) - - Enable **Google Provider** in the [Auth section](https://console.firebase.google.com/project/_/authentication/providers) - - Import and configure Firebase in `public/index.html` where the `TODO` is located - - Install the required dependencies by running `npm install` in the `functions` directory - - Deploy your project using `firebase deploy` - - Open the app and start following a user, this will send a notification to him. + 1. Create a Firebase Project using the [Firebase Console](https://console.firebase.google.com). + 1. Enable **Google Provider** in the [Auth section](https://console.firebase.google.com/project/_/authentication/providers) + 1. Clone or download this repo and open the `fcm-notification` directory. + 1. You must have the Firebase CLI installed. If you don't have it install it with `npm install -g firebase-tools` and then configure it with `firebase login`. + 1. Configure the CLI locally by using `firebase use --add` and select your project in the list. + 1. Install dependencies locally by running: `cd functions; npm install; cd -` + 1. Deploy your project using `firebase deploy` + 1. Open the app using `firebase open hosting:site`, this will open a browser. + 1. Start following a user, this will send a notification to him. diff --git a/fcm-notifications/public/index.html b/fcm-notifications/public/index.html index a3f79947df..01ee962283 100644 --- a/fcm-notifications/public/index.html +++ b/fcm-notifications/public/index.html @@ -83,9 +83,11 @@

Send FCM notifications demo

- + + + + + diff --git a/instagram-auth/README.md b/instagram-auth/README.md index 27f47960d3..0306d4d9fb 100644 --- a/instagram-auth/README.md +++ b/instagram-auth/README.md @@ -8,7 +8,6 @@ This sample shows how to authenticate using Instagram Sign-In on Firebase. In th Create and setup the Firebase project: 1. Create a Firebase project using the [Firebase Developer Console](https://console.firebase.google.com). 1. Enable Billing on your Firebase the project by switching to the **Blaze** plan, this is currently needed to be able to perform HTTP requests to external services from a Cloud Function. - 1. Copy the Web initialisation snippet from **Firebase Console > Overview > Add Firebase to your web app** and paste it in `public/index.html` and `public/popup.html` in lieu of the placeholders (where the `TODO(DEVELOPER)` are located). Create and provide a Service Account's credentials: 1. Create a Service Accounts file as described in the [Server SDK setup instructions](https://firebase.google.com/docs/server/setup#add_firebase_to_your_app). @@ -19,9 +18,9 @@ Create and setup your Instagram app: 1. Once Your app is created make sure you specify your app's callback URL in the list of **Valid redirect URIs** of your Instagram app. You should whitelist `https://localhost:5000/popup.html` for local development and if you deploy on App Engine (See Deploy section below) you should whitelist the URL `https://.firebaseapp.com/popup.html`. 1. Copy the **Client ID** and **Client Secret** of your Instagram app and use them to set the `instagram.client_id` and `instagram.client_secret` Google Cloud environment variables. For this use: -```bash -firebase functions:config:set instagram.client_id="yourClientID" instagram.client_secret="yourClientSecret" -``` + ```bash + firebase functions:config:set instagram.client_id="yourClientID" instagram.client_secret="yourClientSecret" + ``` > Make sure the Instagram Client Secret is always kept secret. For instance do not save it in your version control system. diff --git a/instagram-auth/public/index.html b/instagram-auth/public/index.html index 1401acd5ed..5b8d91f508 100644 --- a/instagram-auth/public/index.html +++ b/instagram-auth/public/index.html @@ -68,9 +68,9 @@

Sign in with Instagram demo

- + + + diff --git a/instagram-auth/public/popup.html b/instagram-auth/public/popup.html index cd0aff546a..a3a822a165 100644 --- a/instagram-auth/public/popup.html +++ b/instagram-auth/public/popup.html @@ -24,9 +24,9 @@ Please wait... - + + + + + diff --git a/linkedin-auth/public/popup.html b/linkedin-auth/public/popup.html index 9b9e0d4103..a202749a2b 100644 --- a/linkedin-auth/public/popup.html +++ b/linkedin-auth/public/popup.html @@ -24,9 +24,9 @@ Please wait... - + + + + + diff --git a/user-data-cleanup/README.md b/user-data-cleanup/README.md index 88da9c92ce..037fd91ebe 100644 --- a/user-data-cleanup/README.md +++ b/user-data-cleanup/README.md @@ -30,18 +30,15 @@ When the user deletes his account a Function will trigger and automatically dele The function triggers on user account deletions. -## Setting up the sample - -This sample comes with a web-based UI for testing the function. To set it up: - - - Create a Firebase Project using the Firebase Developer Console - - Enable Google Provider in the Auth section - - Import and configure Firebase in the `public/index.html` where the `TODO` is located - - ## Deploy and test -This sample comes with a web-based UI for testing the function. To test it out: +This sample comes with a Function and web-based UI for testing the function. To configure it: - - Deploy your project using `firebase deploy` - - Open the app using `firebase open`, Sign in using Google Sign-In and delete the account using the provided button. You can check at each step of the way if the data has been deleted using the Firebase console. + 1. Create a Firebase Project using the [Firebase Console](https://console.firebase.google.com). + 1. Clone or download this repo and open the `user-data-cleanup` directory. + 1. You must have the Firebase CLI installed. If you don't have it install it with `npm install -g firebase-tools` and then configure it with `firebase login`. + 1. Configure the CLI locally by using `firebase use --add` and select your project in the list. + 1. Install dependencies locally by running: `cd functions; npm install; cd -` + 1. Deploy your project using `firebase deploy` + 1. Open the app using `firebase open hosting:site`, this will open a browser. + 1. Sign in using Google Sign-In and delete the account using the provided button. You can check at each step of the way if the data has been deleted using the Firebase console. diff --git a/user-data-cleanup/public/index.html b/user-data-cleanup/public/index.html index 123278dd25..c1e46f48c6 100644 --- a/user-data-cleanup/public/index.html +++ b/user-data-cleanup/public/index.html @@ -68,9 +68,10 @@

Account events demo

- + + + +