Skip to content

[firebase/auth] Auth action links ignore linkDomain param #2887

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

Open
jorgeroncero opened this issue Mar 31, 2025 · 1 comment
Open

[firebase/auth] Auth action links ignore linkDomain param #2887

jorgeroncero opened this issue Mar 31, 2025 · 1 comment

Comments

@jorgeroncero
Copy link

jorgeroncero commented Mar 31, 2025

Describe your environment

  • Operating System version: macOS Sequoia
  • Firebase SDK version: 13.1.0
  • Firebase Product: auth
  • Node.js version: v22.14.0
  • NPM version: v10.9.2

Describe the problem

Steps to reproduce:

Whenever we make a call to admin.auth.generateSignInWithEmailLink or any other actionLink-related method, the linkDomain is ignored and the firebase project default url is used instead.

The firebase-admin SDK calls the Identity Toolkit API, which is the actor that is probably ignoring the linkDomain param.

Relevant Code:

var actionCodeSettings = {
      url: `${appDomain}/mobile/emailLinkSignIn`,
      handleCodeInApp: false,
      linkDomain: '<other-site>.firebaseapp.com, // Other Hosting site: Does not work, uses default instead
      // linkDomain: '<custom-domain>, // Custom domain registered in Hosting: Does not work, uses default instead
};

const signInWithEmailLink = await admin.auth.generateSignInWithEmailLink(email, actionCodeSettings);

console.log(signInWithEmailLink) // Returns "https://<project-id>.firebaseapp.com/__/auth/action?..."
@robmcilroy1992
Copy link

We're also facing the same issue with generateSignInWithEmailLink.

Firebase SDK version: 13.2.0
Firebase Product: auth
Node.js version: v20.11.0
PNPM version: v8

Our domain is connected on Firebase hosting and has been added to authorised domains whitelist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants