Skip to content

Indexes

Olivier Lefebvre edited this page Jul 29, 2018 · 1 revision

Realtime database

Thoses rules are automaticaly created by stores implementations if you authenticate requests with an Oauth2 access token.
If you chose a Firebase ID token, you must add those rules manualy to your database.

{
	"rules": {
		"users": {
			".indexOn": ["NormalizedEmail", "NormalizedUserName"]
		},
		"roles": {
			".indexOn": "NormalizedName"
		},
		"users-roles": {
			".indexOn": ["UserId", "RoleId"]
		},
		"user-claims": {
			".indexOn": ["UserId", "ClaimType"]
		},
		"user-logins": {
			".indexOn": ["ProviderKey", "UserId"]
		}
	}
}

Cloud Firestore

No index need.

Clone this wiki locally