How to use firebase token authentication using web-api2 controller

I have a firebase authentication token, which I am trying to transfer to the api web controller. I follow this post here. stack overflow

I have a bearer token in the headers of the $ http request. angular

I took care of the corsa (if I did not miss something). The endpoint in my api project receives a request with null headers. So I am trying to debug errors, but without any specific errors. I'm not sure where to look. apiproject

+6
source share
1 answer

You can get the value of the "Authorization" element in the header using the following code:

string firebaseAuthToken = string.Empty; firebaseAuthToken = actionContext.Request.Headers.GetValues("Authorization").First(); 
+2
source

All Articles