Skip to content

expose the payload on a decoded token to allow access to custom claims #85

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

markbreuss
Copy link

@markbreuss markbreuss commented May 28, 2025

If custom claims have been set via a custom token creation they are currently not accessible via the decoded token.
This PR exposes the original payload to access custom claims.
https://firebase.google.com/docs/auth/admin/create-custom-tokens#database-rules_1

It also finishes the todo in the code.

Let me know what you think.

@CLAassistant
Copy link

CLAassistant commented May 28, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@rrousselGit rrousselGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add tests for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants