Using the firestore online security simulation with custom claims results in an error, but it works perfectly when deployed (while actually handling real requests). The error is:
Error: simulator.rules line [5], column [23]. Property admin is undefined on object.
I have confirmed that the user actually have the claim (by the admin SDK and by using the application I'm adding the rules to).
match /{document=**} {
allow write: if request.auth.token.admin;
allow read;
}
Is this expected? Is the simulator broken or am I missing something? Not being able to use the simulator will be hard as I expect to use a few custom claims in my application.