Git Product home page Git Product logo

baezos's Introduction

Firenotes: Firebase Authentication on Google App Engine

A simple note-taking application that stores users' notes in their own personal notebooks separated by a unique user ID generated by Firebase. Uses Firebase Authentication, Google App Engine, and Google Cloud Datastore.

This sample is used on the following documentation page:

https://cloud.google.com/appengine/docs/python/authenticating-users-firebase-appengine/

You'll need to have Python 2.7 and the Google Cloud SDK installed and initialized to an App Engine project before running the code in this sample.

Setup

  1. Clone this repo:

     git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
    
  2. Navigate to the directory that contains the sample code:

     cd python-docs-samples/appengine/standard/firebase/firenotes
    
  3. Within a virtualenv, install the dependencies to the backend service:

     pip install -r requirements.txt -t lib
    
  4. Add Firebase to your app.

  5. Add your Firebase project ID to the backend’s app.yaml file as an environment variable.

  6. Select which providers you want to enable. Delete the providers from main.js that you do no want to offer. Enable the providers you chose to keep in the Firebase console under Auth > Sign-in Method > Sign-in providers.

  7. In the Firebase console, under OAuth redirect domains, click Add Domain and enter the domain of your app on App Engine: [PROJECT_ID].appspot.com. Do not include "http://" before the domain name.

Run Locally

  1. Add the backend host URL to main.js: http://localhost:8081.

  2. Navigate to the root directory of the application and start the development server with the following command:

     dev_appserver.py frontend/app.yaml backend/app.yaml
    
  3. Visit http://locahost:8080/ in a web browser.

Deploy

  1. Change the backend host URL in main.js to https://backend-dot-[PROJECT_ID].appspot.com.

  2. Deploy the application using the Cloud SDK command-line interface:

     gcloud app deploy backend/index.yaml frontend/app.yaml backend/app.yaml
    

    The Cloud Datastore indexes can take a while to update, so the application might not be fully functional immediately after deployment.

  3. View the application live at https://[PROJECT_ID].appspot.com.

baezos's People

Contributors

leekkww avatar shotbythought avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.