Open rymesaint opened 2 years ago
Hey there @rymesaint! Wanted to clarify that some of the claims that are missing are intentionally ignored by the Auth Emulator, e.g. exp
, iat
, at_hash
- for more information about ignored fields, check out the inline documentation of this interface: https://github.com/firebase/firebase-tools/blob/ae788e76a8ea45e1c967bd6e37078a991c89dc6b/src/emulator/auth/operations.ts#L3308
Your issue does point out some unintentional behavior though, i.e. id
claim should be the sub
claim and verified_email
should be email_verified
. I'll open a PR that addresses those issues. Thanks for pointing this out!
Just a quick update: Seems like the fields returned depends on what is used to sign in when signInWithIdp
is invoked. The existing returned claims (aside from the ones that are intentionally ignored) are correct in certain cases and should be closer to what you're experiencing in other cases.
Since the scope of this is quite a bit larger than expected, I'm going to leave this issue open. I'll go ahead and file an internal bug for this in the meantime (Googler-only internal tracking bug: b/240451476). Let me know if/how this is negatively impacting you, and for other folks reading this, please thumbs up this comment so we know how to prioritize this bug. Thanks for your patience
[REQUIRED] Environment info
firebase-tools: 11.3.0
Platform: macOS
[REQUIRED] Test case
Login using emulator Login using firebase auth production
[REQUIRED] Steps to reproduce
Login via Google Account
Get Return AdditionalUserInfo > Profile (JSON)
[REQUIRED] Expected behavior
[REQUIRED] Actual behavior