有没有一种方法可以指出我不是Firebase用户,从而保护文件夹中的文件

时间:2019-01-04 02:02:15

标签: javascript firebase firebase-authentication firebase-hosting

您好,有一种方法可以将功能应用于文件夹中的所有页面。

例如,如果我有一个用户文件夹,其中包含Firebase用户也可以访问的所有页面,我该如何限制不是

用户的每个人对该文件夹的访问
        firebase.auth().onAuthStateChanged(function(user) {
            if (user) {
            // maintain the page
            } else {
                window.location = 'index.html'
            }
        });

谢谢

0 个答案:

没有答案