1

I have a cloud service that is built on NodeJs.

I want to tie in the Nest-API but I dont understand how I can manage multiple access_tokens with Firebase to receive realtime events for multiple people using my service.

Example, User A authenticates, and I get access_token 123. Now User B authenticates and I get access_token 345. Obviously I will store the access_tokens on my server. But how do I get my NodeJS backend to listen to both users Nests?

Carsten
  • 460
  • 5
  • 15

1 Answers1

0

You can really only authenticate one firebase connection at a time as the authentication is pretty much global. You may want to check out Rest Streaming instead. Here is an example of it built in node https://github.com/nestlabs/rest-streaming

urman
  • 596
  • 2
  • 9
  • Yup that was my understanding as well (referring to firebase restriction). Streaming REST will do the trick – Carsten May 05 '16 at 14:07
  • 2
    Today Nest announced REST Multiplex, which will also do what you want if you switch protocols. See https://developers.nest.com/documentation/cloud/multiplex-overview – David W. Keith May 17 '16 at 22:53