Skip to content
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

Update type of ParsedToken to include unknown #6569

Merged
merged 5 commits into from Sep 7, 2022
Merged

Conversation

sam-gc
Copy link
Contributor

@sam-gc sam-gc commented Aug 26, 2022

This change updates the type of the custom claim field in the ParsedToken interface to be any. This more accurately reflects that a JWT may contain any valid JSON object.

While using the unknown type would have been more type-safe (and use of any is generally frowned-upon), it unfortunately makes this change backwards-incompatible.

Fixes #6553

@changeset-bot
Copy link

changeset-bot bot commented Aug 26, 2022

🦋 Changeset detected

Latest commit: a3ef14c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/auth Patch
@firebase/auth-compat Patch
firebase Patch

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

@sam-gc sam-gc requested a review from egilmorez as a code owner August 26, 2022 17:07
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 26, 2022

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 26, 2022

@sam-gc sam-gc merged commit 666c8ec into master Sep 7, 2022
@sam-gc sam-gc deleted the sam-gc/claims-type branch September 7, 2022 17:13
@google-oss-bot google-oss-bot mentioned this pull request Sep 14, 2022
bhparijat pushed a commit that referenced this pull request Sep 23, 2022
* Update type of ParsedToken to include unknown

* Make it unknown outright

* Changeset

* Switch over to any instead

* Update changelog
@firebase firebase locked and limited conversation to collaborators Oct 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ParsedToken type does not support allowed value types in Firebase custom claims
7 participants