Can app Oauth-orize itself?

I’m developing an app that uses Firebase database. I’m not sure if I understand completely the idea of authorisation here. I understand the scenario in which a user needs to autohrize in order to access the app. However my app in order to populate the view needs to access database first. So basically I want the app to have an access to database all the time. So even when a user is not logged in they can see some data. How do you achieve it with Oauth? Documentation says only about authorising users via creating an account. Do I miss something here?

Oauth is only for authenticating . You should make a separate database.

1 Like

Yes I guess you’re right but I managed to find workaround. Firebase offers something called anonymous auth. When I launch my app with that method it gets authenticated and gets access to database. Of course it would be really stupid to leave it just like that becaue after that anyone could hack my database using JS console in their browser. However with a little bit of cusotmization, that is limiting permissions of the app to only reading data but not changing it should do the trick. Thanks for feedback anyway :slight_smile:
EDIT: I probably forgot to mention one of the most important issues. My app is purely front-end but still it needs an acces to database in order to get some data. If I had a back-end implemented then it wouldn’t be an issue. What I tried to achieve was an app with only front-end code that runs in a browser but still with an access to secure data on some remote back-end. :smirk: