bug: updateProfile with photoUrl does not work
loneoakdev opened this issue ยท comments
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
- Sign in using any method
- On the Home page, click the Update Photo Url button
- The Photo Url input box will not change
- 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.
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?
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.
Alright, thanks for you fast response.