Reputation: 73
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:
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?
Upvotes: 3
Views: 2539
Reputation: 50830
Firebase actually has a detailed explanation on Authenticating with Firebase in JavaScript Using a Custom Authentication System which is what you are planning to do. You verify that third party token and then create a custom token using signInWithCustomToken()
. Then you can signInWithCustomToken()
and use features like Firebase security rules with Firebase Authentication.
Upvotes: 0