1

I am trying to use Firebase from C# using the "rest api". The rules in our Firebase DB require authentication in order to read a write, and we use custom authentication - using a custom authorization server we have here.

So, I created a user and requested a token for that user from our authorization server. Then I try to use that token with simple get request, as described here. Unfortunately, the request failed, with 403 error code.

Then I try to run exactly the same request - using the same user id and token - from the JS SDK (by calling signInWithCustomToken) - and the request succeeded. I even try to use the simulator with the token and the path I was trying to access - and according to the simulator, I should have access to the resource.

How is that possible? Is there something I missed that is required in order to use the rest api and custom authentication?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Omer Levi Hevroni
  • 1,935
  • 1
  • 15
  • 33
  • I looked at the possible duplicate but I think I have a different issue. I was able to successfully create a token using service account, but not able to use it with the REST API. – Omer Levi Hevroni Dec 21 '16 at 08:37
  • Look like now there is a documentation on how this should be done: https://firebase.google.com/docs/reference/rest/auth/ – Omer Levi Hevroni Jun 21 '17 at 05:13

0 Answers0