Research on implementing Firebase for user authentication

After the discussion, we planned on using the Firebase authentication system with Spring security to provide users with a Single Sign-in login system.

I will carry out a research on the credibility of implementing an above-mentioned system.

3 Likes

Hi all,

Sorry for the late update on the $subject.
Following are some of the information I gathered to implement the $subject.

User Authentication using Firebase

By following below steps we can implement Firebase Authentication for the Frontend,

  1. Get authentication credentials.
    Users will be given an interface to sign-in and then their sign-in data will be passed to a federated identity provider. This provider will return an OAuth token.

  2. Validate token with Firebase Authentication SDK.
    Then the token will be validated against Firebase SDK and Firebase will return a User profile object (unique ID token(JWT), primary email address, name, and photo URL).

  3. Send the User object to ScholarX Backend services.
    Then the user object(or JWT token) will be sent to ScholarX backend end services to be persisted.

ScholarX Backend services

Following is the persisting process for the user,

  1. Verify the integrity and authenticity of the ID token and retrieve the UID.
    Through the Firebase Admin SDK, we can verify this JWT token and get it decoded. This decoded variable will have a UID, which is unique and permanent to each and every Firebase registrant.

  2. Persist the UID in ScholarX Database.

1 Like