I want to use a third party JWT token (from my current auth system), generate a custom firebase token based on this JWT token and use this to access the firestore database.
My concept is the following:
- App connects on startup to third party backend for authentication with email/password -> receive JWT Token
- App calls own firebase function with this third party token
- Firebase function validates token with public key of my third party backend
- Return new custom firebase token created by admin-sdk
- App connects to firebase with this new custom token
I guess a better way would be to issue a (second) token from my third party backend (generated with the admin-sdk), but I have no real access to this third party backend.
Is this a way to go for me? Or are there any other options based on my setup?