External Interfaces - psit4-lamas/PSIT4-LaMaS GitHub Wiki
We make extensive use of Google's Firebase. Firebase Auth for authentication, Firestore as the NoSQL database, Cloud Storage to store videos and documents, Cloud Functions for backend functionality and Hosting to host the web application.
To check if a user is logged in we use:
firebase.auth().onAuthStateChanged((user) => { if (user) {...} else {...} });
To log a user in we use this function:
firebase.auth().signInWithEmailAndPassword(email, password);
For more details refer to the Firebase documentation:
Authenticate with Firebase using Password-Based Accounts using Javascript