Express & Firebase - Failing to set header before redirect

前端 未结 1 1449
死守一世寂寞
死守一世寂寞 2021-01-26 08:41

I am trying to make Firebase authentication work on the server.

\'use strict\';

const functions = require(\'firebase-functions\');
const admin = require(\'fire         


        
1条回答
  •  有刺的猬
    2021-01-26 09:30

    You have to send the Authorization header with every request. HTTPS functions are stateless. They don't remember anything from a prior request. So, you shouldn't depend on redirect behavior to retain state. Instead, the client needs to figure out where to go next and make the next request itself.

    0 讨论(0)
提交回复
热议问题