markovuksanovic
markovuksanovic

Reputation: 15906

Can Firebase hosting restrict access to resources?

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

Answers (2)

WraithKenny
WraithKenny

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

Frank van Puffelen
Frank van Puffelen

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

Related Questions