Skip to content
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

bug: updateProfile with photoUrl does not work #649

Closed
5 of 16 tasks
loneoakdev opened this issue Jun 21, 2024 · 3 comments · Fixed by #650
Closed
5 of 16 tasks

bug: updateProfile with photoUrl does not work #649

loneoakdev opened this issue Jun 21, 2024 · 3 comments · Fixed by #650
Labels
bug/fix Something isn't working package: authentication

Comments

@loneoakdev
Copy link

loneoakdev commented Jun 21, 2024

Plugin(s)

  • Analytics
  • App
  • App Check
  • Authentication
  • Crashlytics
  • Cloud Firestore
  • Cloud Messaging
  • Cloud Storage
  • Performance
  • Remote Config

Version

6.0.0

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

Updating the photoUrl of the user using FirebaseAuthentication.updateProfile({ photoUrl: 'path-to-photo' }) does not work and the photoUrl is not updated in Firebase.
Please note that using FirebaseAuthentication.updateProfile({ displayName: 'John Smith' }) works perfectly fine and updates the display name properly.
I suspect that it may be the name of the parameter since the Firebase Javascript implementation uses "photoURL" not "photoUrl"

Expected behavior

Updating the photoUrl using FirebaseAuthentication.updateProfile({ photoUrl: 'path-to-photo' }) should update the value in Firebase.

Reproduction

https://ominous-engine-r4r9qxgwx9xcxpwg.github.dev

Steps to reproduce

  1. Sign in using any method
  2. On the Home page, click the Update Photo Url button
  3. The Photo Url input box will not change
  4. Reload the page to make sure you're reloading the Firebase user and it still will not change

Other information

Just out of curiosity, I changed the node_modules/@capacitor-firebase/authentication/dist/esm/definitions.d.ts file for UpdateProfileOptions and changed photoUrl to photoURL. This actually made it work normally, but probably isn't the best solution. I'm assuming some actual mapping needs to be done somewhere since this attribute is referenced as photoUrl everywhere else.

Capacitor doctor

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 6.1.0
@capacitor/core: 6.1.0
@capacitor/android: 6.1.0
@capacitor/ios: 6.1.0

Installed Dependencies:

@capacitor/android: 6.1.0
@capacitor/cli: 6.1.0
@capacitor/core: 6.1.0
@capacitor/ios: 6.1.0

[success] iOS looking great! 👌
[success] Android looking great! 👌

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.
@loneoakdev loneoakdev added bug/fix Something isn't working needs: triage labels Jun 21, 2024
@robingenz
Copy link
Member

Thank you for reporting this! There is indeed a bug on the web. But it should work on Android and iOS. Have you also tested these two platforms?

@loneoakdev
Copy link
Author

You're absolutely correct...I just tried it in an iOS simulator using photoUrl and it worked fine.
I do most of my basic testing on the web before moving over to the simulators, so I caught it there before seeing that it works in Android and iOS.
Thanks for clarifying that.

@robingenz
Copy link
Member

Alright, thanks for you fast response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/fix Something isn't working package: authentication
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants