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

rawNonce missing from credential - Firebase Auth v9 #5553

Closed
harry-herskowitz opened this issue Sep 27, 2021 · 2 comments · Fixed by #5574
Closed

rawNonce missing from credential - Firebase Auth v9 #5553

harry-herskowitz opened this issue Sep 27, 2021 · 2 comments · Fixed by #5574

Comments

@harry-herskowitz
Copy link

rawNonce missing from OAuthProvider credential.
Code:

  const provider = new OAuthProvider('apple.com')
  const credential = provider.credential({
    idToken: result.credential?.idToken,
    rawNonce: result.credential?.nonce
  })
  console.log(credential)

Result:

idToken: <myIDToken>
pendingToken: null
providerId: "apple.com"
signInMethod: "apple.com"

@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@sam-gc
Copy link
Contributor

sam-gc commented Oct 4, 2021

Hi, thanks for reaching out! A couple of things are going on here: for one, the nonce field was never getting set in the credential since the SDK didn't pass it through correctly to the underlying method. Separately from that, the nonce field was not documented in v8 and it is not exposed in any of our other SDKs. So while the PR linked will set the field correctly (so that e.g. signInWithCredential will work as expected), the field itself will now be marked private.

@sam-gc sam-gc added the bug label Oct 4, 2021
@firebase firebase locked and limited conversation to collaborators Nov 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants