firebase / firebase/firebase-admin-node

[FR] Multi-Tenancy doesn't check for existence of a tenant

Abierto
#700 19 comentarios 0 reacciones 1 asignado Asignado a @wuyanna Ver en GitHub
api: auth type: feature request
Lenguaje dominante
TypeScript
Estrellas
1.7k
Forks
419
Merge medio
3 d 10 h
PR fusionados (30 d)
16

Descripción

**Is your feature request related to a problem? Please describe.**
The issue is related with the creation of a tenant using the sdk server side. The sdk is missing a way to check if the tenant (the displayName to be precise) already exist in the project. The sdk will create a tenant with a different id but with the same name if the create operation is performed multiple times with the same parameter. I do understand that the sdk distinguish the tenants using the id, but it is not very friendly.

**Describe the solution you'd like**
It would be much better if the sdk would mock the behavior and strategy used in the creation of a user (it checks for example if the email is already in use, and if it is it throws an exception). The sdk checks if the displayname is already taken and if so throw an exception. This feature could easily been optional, and the developer decide if enforce it.

**Describe alternatives you've considered**
For now I am just checking if the displayname exist in a json object that works as map between tenant's name and tenant's id. It easier to deal with a name (decided upfront by the developer) than relies on an ID automatically generated by the cloud.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.