Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (34 sloc) 1.43 KB

firebase-authentication

This app demonstrates how to use firebase-authentication in a simple web-app. You should have a working firebase project before you can run this.

Before you start, do the following

  • create a firebase project.
  • choose the correct pricing plan. A free spark-plan should suffice for this demo.
  • create a web app in you firebase project.
  • copy the firebase configuration from you firebase project and replace them in the html files under public directory
  •   // Your web app's Firebase configuration
      let firebaseConfig = {
        apiKey: "your-api-key",
        authDomain: "your-project-id.firebaseapp.com",
        databaseURL: "https://your-project-id.firebaseio.com",
        projectId: "your-project-id",
        storageBucket: "",
        messagingSenderId: "your-messaging-sender-id",
        appId: "your-app-id"
      };
      // Initialize Firebase
      firebase.initializeApp(firebaseConfig);
  • download the service-account.json file from firebase. keep it safely under the root of the project as "fb.json"
  • build the app go build ./...
  • run the app ro run main.go
  • go to index page http://localhost:1313
  • enter your login details if you have created account already
  • else go to signup page and create an account

screenshots

Login login

Signup Signup

Dashboard Dashboard

You can’t perform that action at this time.