Complete the code to allow read access only if the user is authenticated.
allow read: if request.auth [1];
In Firebase rules, request.auth != null means the user is signed in.
Complete the code to allow write access only if the user's UID matches the document ID.
allow write: if request.auth.uid [1] resource.id;
Users can write only to their own documents, so UID must equal document ID.
Fix the error in the rule to allow read access only if the user is authenticated and email is verified.
allow read: if request.auth [1] request.auth.token.email_verified == true;
Both conditions must be true, so use logical AND '&&'.
Fill both blanks to allow write access only if the user is authenticated and their role is 'admin'.
allow write: if request.auth [1] && request.auth.token.role [2] 'admin';
User must be signed in (request.auth != null) and have role 'admin' (request.auth.token.role == 'admin').
Fill all three blanks to allow read access only if the user is authenticated, email is verified, and the document's owner field matches the user's UID.
allow read: if request.auth [1] && request.auth.token.email_verified == true [2] resource.data.owner [3] request.auth.uid;
All three conditions must be true: user signed in, email verified, and user owns the document.