Reputation: 15906
Is it possible to restrict access to a resource (i.e. index.html) depending on whether the user is logged in or not? Maybe something like .htaccess?
Upvotes: 13
Views: 9904
Reputation: 1041
There's new info on this: https://firebase.google.com/docs/hosting/functions (example: https://github.com/firebase/functions-samples/tree/master/authorized-https-endpoint )
You should be able to use a Cloud Function to restrict access to content (which is server-side authenticated and generated).
Upvotes: 11
Reputation: 598765
No. Firebase hosting doesn't implement access control to static resources.
Also see the discussion in the comments of this question: Firebase route security without AngularFire
Upvotes: 14