简体   繁体   中英

Update user profile in firebase on being connected

Below is the Firebase sample code, where I can update a user after being authenticated. (var user = firebase.auth (). currentUser;)

  var user = firebase.auth().currentUser;

user.updateProfile({
  displayName: "Jane Q. User",
  photoURL: "https://example.com/jane-q-user/profile.jpg"
}).then(function() {
  // Update successful.
}).catch(function(error) {
  // An error happened.
});

I would like to know if it is possible to edit the user without having to be logged in, use the updateProfile function with the user's UID or EMAIL.

Thanks

除非用户已登录,否则用户无法成功调用updateProfile 。其他任何事情都将是一个巨大的安全漏洞,因为这意味着互联网上的任何人都可以仅通过 UID 的知识来更新任何配置文件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM