Skip to content

Firebase Authentication

Intro

To access the application users need to authenticate themselves. For this application we use Firebase Authentication to provide multiple authtication methods and provide the user identity.

Firebase Authentication JavaScript SDK

The Firebase Authentication JavaScript SDK provides a robust authentication - Firebase Authentication JavaScript SDK API. All methods are built in the resources//ts/Store/firebase.ts file and accessed bia the Pinia firebaseStore in the relevant Vue components.

For this app, this SDK provides: - Login via email & password to Firebase - Login via email 1-time-code to Firebase - Login via Google to Firebase - Get current authenticated user in Firebase - Logout user from Firebase - Create Firebase user from email & password

Firebase Authentication PHP SDK

The unofficial Firebase Authentication PHP SDK is helpful for backend Firebase Auth services. This SDK has limitations as it does not allow for global SSO login or checking current authenticated users.

For this app, this SDK provides: - Validate auth token of user and fetch user - Get user by email - Get user by id - Create Firebase user - Update Firebase user

Firease Service

The FirebaseService.php file contains all logic related to firebase PHP SDK