I have a website which uses Firebase for user authentication and storing user data (SPA with JSON web token). The user data can be fetched as soon as the user is authenticated.
In the moment this works as follows:
- Client enters auth data
- Firebase confirms authentication
- client requests stored user data
- Firebase searches user data in database
- data is sent to user
What I want is the following:
- Client enters auth data
- Firebase authenticates user and searches directly for user data in database
- authentication is confirmed and data is sent to user.
In other words: In the first solution the way from the client to Firebase has to be made twice while in the second solution it only has to be made once (sending user data directly after authentication), such being faster.
Question: Is this possible?