colyseus / demo-firebase-authentication

Authentication using Colyseus and Firebase

Home Page:https://colyseus-demo.web.app/firebase/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Colyseus + Firebase Auth Demo

Quick code references:

Requirements

  • Create a Firebase App
  • Add "Anonymous" and "Email/Password" as Authentication providers on Firebase:
    • Firebase Console > Authentication > Sign-in method > Anonymous > Enable
    • Firebase Console > Authentication > Sign-in method > Email/Password > Enable
  • Configure both client and server with the Firebase App credentials, as documented below

Client-side

Replace the firebaseConfig from client/src/firebase.js with your Firebase app's credentials.

Starting the client:

npm install
npm start

Server-side

(We are following the "Initialize the SDK in non-Google environments" documentation here.)

Add your service-account-file.json file to the server/ folder.

You can get this file from the "Firebase Console" > "Project Settings" > "Service Accounts" > "Generate New Private Key".

Starting the server:

npm install
npm start

About

Authentication using Colyseus and Firebase

https://colyseus-demo.web.app/firebase/


Languages

Language:HTML 36.9%Language:JavaScript 32.8%Language:TypeScript 30.3%