Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

221
Views
Firebase Microsoft SignInWithCredential

I am setting up Microsoft authentication in Firebase (web js sdk), but I'm running into an error with firebase.auth.signInWithCredential. I can successfully get an id token from Microsoft, but the Firebase auth step fails. I've tried Firebase v8 and v9, and various ways of forming my credential object. In fact, I get the same error even passing an access token. There seems to be something wrong with the Firebase library. Has anyone experienced this issue before and resolved it?

Code:

const { id_token } = authResponse.params; // I've verified that id_token is correct
const credential = new firebase.auth.OAuthProvider("microsoft.com").credential({
  idToken: id_token,
  rawNonce: "12345",
});
await firebase.auth().signInWithCredential(credential);

The credential seems to be generated fine:

Object {
  "accessToken": undefined,
  "idToken": "eyJ0eXAiOiJKV...",
  "nonce": "12345",
  "pendingToken": null,
  "providerId": "microsoft.com",
  "secret": undefined,
  "signInMethod": "microsoft.com",
}

But the signInWithCredential step gets the following error:

Uncaught (in promise) 
code: "auth/internal-error"
message: "Invalid IdP response/credential: http://localhost?id_token=eyJ0eXAiOiJKV..."
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Seems like signInWithCredential isn't supported for Microsoft OAuth. https://cloud.google.com/identity-platform/docs/web/microsoft I will try doing signInWithCustomToken for existing users and give a warning for new users to sign up first on web, where I will do signInWithPopup

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!