2

I have a full stack application with react frontend and node backend. I want to integrate firebase authentication such that the user gets a jet using firebase and then can use it to interact with the routes only for the authenticated users in the REST API

I am able to log in the user in the frontend and am getting a UID, idToken and Access token. What is the correct method to go on from here and how do I use these for sending secure requests to my backend?

1 Answer 1

2

You will want to use the Firebase Admin SDK on the backend and use it to verify ID tokens coming from the client.

Sign up to request clarification or add additional context in comments.

2 Comments

So I will store the idToken in a cookie, and in every request to the node API, I will send it in the header, verify it in the middleware and then handle the case? Is the accessToken of any use?
I don't know - do you need anything other than user verification? Usually it's just the ID token that matters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.