Using Auth rules in Dgraph Cloud / Slash GraphQL when running the Firebase Emulator

I am currently using parts of the Firebase emulator including its Authentication feature. I have Firebase + Dgraph Cloud authentication working, however it fails when I switch to using the local emulator. To get around this I have two backends, one without the Auth rules however it is becoming a little cumbersome to keep these two back ends in sync.

I believe this is due to the JWKURL being served from localhost rather than a publicly accessible URL. Is there a way to get around this? Keeping in mind I am using Dgraph Cloud so that I don’t have to worry about setting up a back end / docker etc.

Working URL for staging/prod domains: ,"JWKURL":"https://www.googleapis.com/service_accounts/v1/jwk/securetoken@system.gserviceaccount.com"

URL for emulator (I think): ,"JWKURL":"http://localhost:9099/service_accounts/v1/jwk/securetoken@system.gserviceaccount.com"

You can only verify tokens in the emulator itself, and not outside the emulator when created in the emulator. See here. Apparently this is for security reasons.

However, it seems they may have updated it in Node v.9.5.0 to work, so you may need to keep reading that support issue.

Otherwise, do not use firebase auth emulator, use regular firebase auth. You can pick and choose which items in the emulator you want to use.

This has nothing to do with JWKURL in and of itself, just the verification of the id token.

J