akhiljayaram
akhiljayaram

Reputation: 141

Firebase authentication using token

I want to add security to my firebase application so that no one can write data by only knowing firebase url. We are using Android/ iOS client applications and php server. I need the following to be clarified.

  1. Is authentication using token is the best way to add security (we do not need a user login)
  2. I do not want the token to be expired. Is this possible?

  3. Will this effect read operations from client apps which do not use this tokens?

  4. Can I remove this authentication later so that any one can access

Upvotes: 1

Views: 473

Answers (1)

Kato
Kato

Reputation: 40582

Firebase uses a declarative, server-side rules language to control access to data. This is covered in detail in the security docs. I'd highly recommend reading this before continuing; it would address all the questions here and save some pain later.

Authentication is indeed the simplest way to identify users and control access. Firebase provides a number of authentication methods, including Anonymous auth.

Since security rules can also depend on data stored in Firebase, and use a complex rules engine, it's possible to create any sort of dynamic combination of authenticated and non-authenticated access, role-based security, et al.

Upvotes: 1

Related Questions