1
votes

I'm using Firebase Storage to store educational videos which can be accessible only to paid subscribers of a particular video (via a web app).

By default, I don't allow read and write permissions to any of the videos (even if the user has been authenticated using Firebase authentication) but want to allow the read permission to a video if it has been purchased by the authenticated user.

Can it be done ? If not, is there any alternate way of achieving the same ?

1
This is not easy at the moment. See this post on the firebase-talk group for a great explanation of one approach. - Frank van Puffelen

1 Answers

1
votes

Keep it simple. Just have some other associated flags with the user accounts.

You have a master list of videos or links, and each user a list of accessible videos (which would be the ID of that video). If the ID of the video is in the user list then they cannot watch it.

When a user subscribes etc, just add the ID's to that list.