Firebase Auth getProjectConfig is not using the specified API key during passwordless login
Operating System
macOs, windows
Environment (if applicable)
React
Firebase SDK Version
8.10.0
Firebase SDK Product(s)
Auth
Project Tooling
We're using firebase with React and rsbuild
Detailed Problem Description
When using passwordless login the email we get the correct login link:
https://...firebaseapp.com/__/auth/action?apiKey=...
However under the hood we see an api call to https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig that does not use the API key in the url but instead pulls from a different unrelated API key(in our case a key for Gemini flash)
Steps and code to reproduce issue
sendEmailSignupLink(email, redirect, newCredentialToLink)
.then(() => {
onEmailLinkSent?.(email);
})
.catch((error) => {
console.log('[auth error]', error);
})
.finally(() => {
setLoading(false);
});
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Could be an infra issue on our end but we haven't been able to figure out why getProjectConfig is not using the key that's specified in the redirect uri when you open up a sign in form.
Hi @Thexumaker, apologies for the delay. I’ve been trying to reproduce the behavior you mentioned, but so far I haven’t encountered any issues.
I used the code provided in https://github.com/firebase/snippets-web/blob/467eaa165dcbd9b3ab15711e76fa52237ba37f8b/snippets/auth-next/email-link-auth/auth_email_link_send.js and https://github.com/firebase/snippets-web/blob/467eaa165dcbd9b3ab15711e76fa52237ba37f8b/snippets/auth-next/email-link-auth/email_link_complete.js. After running sendSignInLinkToEmail and going through the the sign-in flow, no errors were raised during execution.
I’m not sure if I may be missing something here, could you provide an MCVE where the issue is reproducible so that I can try it out on my end? This will help us narrow down the cause of the error.
Also, I noticed that you're still using an older SDK version, could you please try to upgrade to the latest Firebase version (11.x) and see if that fixes your issue?Thanks!
Hey @Thexumaker. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@Thexumaker if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.