如何从Firebase功能启用客户端重定向?

时间:2018-02-25 23:16:41

标签: firebase auth0

我正在将在Heroku上运行的ReactJS应用转换为在Firebase上作为静态网站托管。我打算使用Firebase函数来处理逻辑和驱动器环境配置。

要求通过第三方Auth0的托管登录页面支持登录 - 客户端通过以下方式重定向到登录页面:

  // redirects to auth0's hosted login page
  this.auth0.authorize(options);

因为提供给此方法的options参数取决于特定于环境的配置,所以它应驻留在云函数(according to my other question that was answered)中。

There is documentation in Firebase for serving dynamic content from a cloud function但我不知道如何从云功能重定向客户端。

有没有办法可以做到这一点?还是一个更实用的解决方案?

0 个答案:

没有答案
相关问题