-
Notifications
You must be signed in to change notification settings - Fork 81
Description
If I create a custom token with:
https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyCustomToken?key=<key>
and then generate creds with this:
credentials.Credentials(token=token, scopes=_scopes)
I can then use these credentials to connect with a Firestore database and the database rules will be respected. I don't use this in production but is very useful for testing. But this doesn't work when testing against the emulator rather than a real db. Testing with the emulator is great but I have some tests that require the db rules to work. I can do this with a subclass of firestore.Client
but it would be nice to have this in library.
It can be done by changing the grpc.Channel used when connecting to the emulator so that it keeps the client._credentials rather than discarding them
I will submit a pull request for this shortly
Thanks