firebase-admin-node icon indicating copy to clipboard operation
firebase-admin-node copied to clipboard

[firebase-admin] dynamic custom link suffix not added in email verification links in auth admin

Open kleeb opened this issue 2 years ago • 4 comments

  • Operating System version: -
  • Firebase SDK version: -
  • Firebase Product: firebase-admin
  • Node.js version: 15.9.0
  • NPM version: 7.5.3

[REQUIRED] Step 3:

Steps to reproduce:

link-suffix is not added in the generatePasswordResetLink and generateEmailVerificationLink of auth admin (firebase-admin/lib/auth) like https://firebase.google.com/docs/dynamic-links/custom-domains

it should be automatically added or ActionCodeSettings should include such param, for instance if you have example.com/link dynamic link, example.com/?link=... is generated instead of example.com/link/?link=...

Relevant Code:

const link: string = await admin.auth().generateEmailVerificationLink(someEmail, {url: '...', dynamicLinkDomain: '...'});
const link: string = await admin.auth().generatePasswordResetLink(someEmail, {url: '...', dynamicLinkDomain: '...'});

kleeb avatar Jan 21 '22 15:01 kleeb

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Jan 21 '22 15:01 google-oss-bot

  • Operating System version: -
  • Firebase SDK version: -
  • Firebase Product: firebase-admin
  • Node.js version: 15.9.0
  • NPM version: 7.5.3

[REQUIRED] Step 3:

Steps to reproduce:

link-suffix is not added in the generatePasswordResetLink and generateEmailVerificationLink of auth admin (firebase-admin/lib/auth) like https://firebase.google.com/docs/dynamic-links/custom-domains

it should be automatically added or ActionCodeSettings should include such param, for instance if you have example.com/link dynamic link, example.com/?link=... is generated instead of example.com/link/?link=...

Relevant Code:

const link: string = await admin.auth().generateEmailVerificationLink(someEmail, {url: '...', dynamicLinkDomain: '...'});
const link: string = await admin.auth().generatePasswordResetLink(someEmail, {url: '...', dynamicLinkDomain: '...'});

Were you ever able to find a solution to this? Running into the same problem.

FXschwartz avatar Jun 07 '23 15:06 FXschwartz

Can you share what you are passing in as the "dynamicLinkDomain" parameter in the admin SDK/rest API call?

Passing in should throw a INVALID_DYNAMIC_LINK_DOMAIN error, since we only accept domain names registered in Firebase Dynamic links.

prameshj avatar Jun 08 '23 01:06 prameshj

cc @renkelvin

prameshj avatar Jun 08 '23 01:06 prameshj