firebase-functions icon indicating copy to clipboard operation
firebase-functions copied to clipboard

beforeUserSignedIn has field misspelled photoURL instead of photoUrl

Open mohankumarelec opened this issue 1 year ago • 3 comments

Related issues

[REQUIRED] Version info

node: 20.18.0

firebase-functions: 6.0.1

firebase-tools: 13.25.0

firebase-admin: 12.6.0

[REQUIRED] Test case

export const beforecreated = beforeUserCreated(async () => {
  return {
    photoUrl: "https://url1.test.com", 
    photoURL: "https://url2.test.com", 
  };
});

[REQUIRED] Steps to reproduce

Create above blocking function and check which url is returned for photo url. its photoUrl and not photoURL.

[REQUIRED] Expected behavior

As per typescript interface it must return photoURL and not photoUrl

[REQUIRED] Actual behavior

photoURL must be returned

Were you able to successfully deploy your functions?

yes

mohankumarelec avatar Nov 18 '24 10:11 mohankumarelec

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Nov 18 '24 10:11 google-oss-bot

Hi @mohankumarelec,

I have raised this issue internally with the team. I proposed either:

  1. Updating the documentation to use photoURL, which would prevent a breaking change.
  2. Renaming photoURL to photoUrl, just as you've done in your PR.

CorieW avatar Mar 06 '25 13:03 CorieW

I believe we're going with option 1.

cabljac avatar Apr 14 '25 10:04 cabljac