We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Similar outcome to 1135
node: 20.14.0
firebase-functions: ^5.0.0
firebase-tools: 13.22.0
firebase-admin: 11.5.0
https://cloud.google.com/identity-platform/docs/blocking-functions#setting_custom_and_session_claims
async signInWithMicrosoft() { const provider = new firebase.auth.OAuthProvider('microsoft.com'); const credentials = await firebase.auth().signInWithPopup(provider) .then(async (value) => { const idTokenResult = await value.user?.getIdTokenResult(true); console.log(idTokenResult); }) ... }
functions.auth.user().beforeSignIn(async (_, context) => { ... return { customClaims: { testProperty: "testValue" } }; });
The customClaims from the beforeSignIn should be present on the idTokenResult
customClaims
The customClaims are missing for this user. Interestingly if we use sessionClaims those do show up on the token.
sessionClaims
Yes
The text was updated successfully, but these errors were encountered:
Hi @drakebennion,
Thanks for reporting this issue! We’ve received it and are reviewing it. We’ll provide updates as soon as possible.
Sorry, something went wrong.
I can't seem to reproduce this using the code you provided. Could you confirm that this testProperty doesn't show up:
testProperty
No branches or pull requests
Related issues
Similar outcome to 1135
[REQUIRED] Version info
node: 20.14.0
firebase-functions: ^5.0.0
firebase-tools: 13.22.0
firebase-admin: 11.5.0
[REQUIRED] Test case
https://cloud.google.com/identity-platform/docs/blocking-functions#setting_custom_and_session_claims
Web App
Cloud function
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
The
customClaims
from the beforeSignIn should be present on the idTokenResult[REQUIRED] Actual behavior
The
customClaims
are missing for this user. Interestingly if we usesessionClaims
those do show up on the token.Were you able to successfully deploy your functions?
Yes
The text was updated successfully, but these errors were encountered: