firebase-admin #94
Comments
Any word on this? I've been wondering the same thing. |
I managed to make it work but I cheated a little. This is how I initialized firebaseAdmin:
This is enough to make firebase admin work if you don't want to check any rules and don't upload any rule file. Now if you want use firebase rules you need to do a bit more. I have a fork of this repository where I made this work and also let users who signInWithCustomToken in.. I hacked a bit around things.
|
@GabiNir, any chance you know how to make this mock credential in an iOS app using Firebase? |
@genkobar sorry but I don't really follow, are you trying to use firebase server in an iOS app? |
@GabiNir Oh, sorry, I conflated this FirebaseAdmin project with the official Firebase library FirebaseAuth. I'm trying test an iOS app against |
@genkobar you can see my previous post about how to work with firebase-server and authenticated users (it doesn't work properly out of the box because for example authenticateWithCustomToken is forcing you to use RS256 and not HS256 which is used by firebase-server). Another thing you might want to do is download your rule file every time you run your tests to keep it in track with how the rules are in your production and not run out of sync. Here is an example:
|
Using @GabiNir's method, I seem to be getting this error:
Anyone know a solution to hack around this? |
@calclavia You can set an alias in etc/hosts in your local computer for localhost as |
@GabiNir Is there a way to do that without hosts (so this can be easily run on a CI)? Seems like there's a way to hack the websocket and trick it to connect to localhost, but I haven't got that working with firebase-admin... firebase-server/test/server.spec.js Line 22 in ce6db94
|
@calclavia Not that it necessarily resolves your problem, but as far as I know, all of the most popular SaaS CI solutions allow you to configure your |
@calclavia see this: firebase/firebase-js-sdk#426, seems like you will just be able to use ws://localhost soon |
also, regarding the original question - see #81 |
Is it possible to use firebase-admin with firebase-server and if it is what credentials do I pass?
The text was updated successfully, but these errors were encountered: