firebase / firebase/firebase-admin-node

[firebase/auth] Auth action links ignore linkDomain param

Abierto
#2,887 3 comentarios 1 reacción 0 asignados Ver en GitHub
api: auth
Lenguaje dominante
TypeScript
Estrellas
1.7k
Forks
419
Merge medio
3 d 10 h
PR fusionados (30 d)
16

Descripción

### 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:

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

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

console.log(signInWithEmailLink) // Returns "https://.firebaseapp.com/__/auth/action?..."
```

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start by reproducing the behavior with admin.auth.generateSignInWithEmailLink and the other actionLink-related methods using the provided actionCodeSettings. Trace the request to the Identity Toolkit API and determine whether linkDomain is dropped by the SDK or ignored by the API; done means the generated link uses the requested hosting or custom domain.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
nodejs, typescript
Área
authentication
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.