I'm currently looking to use Firebase for an internal application that can only be accessed by employees with a Google Account from our organization.
I have an understanding how I can restrict read/write access only to google logins, e.g.
{
"rules": {
".read": "auth.provider === 'google'",
".write": "auth.provider === 'google'"
}
}
But I can't figure out how to restrict access to a specific domain/organization within Google accounts. I know this can be done at the application level, but given the number of channels we'd use to access the database, I want to enforce the auth at the database level in addition to the application level.
Has anyone done this before? Thanks.