Giter VIP home page Giter VIP logo

firebaseauthdemo-backend's Introduction

Getting the project running on your machine locally

Backend

  1. Create a my sql database with name FireBaseAuthDemo or with any name and replace the values in the infrastructures/database for database username, password & database name.

  2. Install the packages with go install

  3. Run go run ./migrate/migrate.go to make the migration of users table.

  4. Build the app with go build

  5. Run the executable with ./firebase-authentication-backend

Frontend repository - FirebaseAuthDemo-Frontend

Topics Covered

Standalone Server

  • Note that each step has its separate branch available on github
  1. Setup a router and start a server on port 8080 and handle / path - test http://localhost:8080 is reachable
  2. establish a database connection - test if database connection is established?
  3. define a model & migrate the model to database to create a table - structure of table to store our user information and how the fields should appear in json & add migration logic, utilize & explain gorm automigrate
  4. add controller for signup and create a entry in database - signup route should be reachable, handle json from req.body and make an entry in users table

Requires FrontEnd To Be Taken Parallely

  1. add firebase app initializaiton and on signup should create user in firebase - instruct how to get serviceAccountKey.json, use it to initalize firebase app, and user firebase app to create user
  2. add some authenticated route - initially show it can be assessed even without logging into user account
  3. add authentication middleware for firebase idToken verification & make authenticated route use it - demo this middleware is hit before the controll is sent to respective controller & demo authenticated route is no longer availabe to not signed in user

firebaseauthdemo-backend's People

Contributors

amitmahato avatar

Watchers

James Cloos 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.