I have a scenario where I am doing OAuth2 authorization to Salesforce and I get in response access token, refresh token etc. I can of course use the access token to get the user info from Salesforce.
The backend of the application is in cloud functions and these needs to be secured with authentication. I would like to secure these with the Firebase authentication information.
Is it possible to create the Firebase user with the OAuth2 authorization information from Salesforce programatically without having to ask the user to authenticate separately to Firebase
One way to implement this use-case is with custom authentication in Firebase. Step-by-step you:
The Firebase specific steps 3 and 4 can be done without user interaction.
You can then use the information of the user that is signed in to Firebase in the usual way.