All Posts

How to Keep Your Custom Claims in Sync with Roles Stored in Firestore

A common question I often encounter, is how to maintain consistency between custom claims in Firebase Auth and role assignments stored in Firestore. It is common in applications to have role-based authentication, where the access to resources is determined by a given role and where there are admin users have the authority to assign or revoke roles.