-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve typing for options.auth #3876
Conversation
🦋 Changeset detectedLatest commit: 39cd8ff The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
When using custom claims in firestore rules I grab them off the top-level token object, as documented here https://firebase.google.com/docs/auth/admin/custom-claims:
In testing I was able to create an app instance that passed those rules like this:
This change makes that
That passes type checking but doesn't seem to work when testing those security rules. Am I doing something wrong or do custom claims need to get hoisted up a level at some point? |
@mdirolf hmmm that's interesting, would you mind opening a new issue rather than discussing it here on this closed PR? |
@samtstern thanks! sorry for not opening a new issue to begin with |
Discussion
This is a non-breaking change to improve the typing for
options.auth
ininitializeTestApp
. Note that this removes theuid
property of the token which should never have been there in the first place (sub
is the canonicaluid
field).Related issues:
Testing
Improved existing unit tests
API Changes
N/A