3
Firebase v3 Auth提供updateProfile
方法,將displayName
和photoURL
傳遞給Firebase。Firebase v3 updateProfile方法
我的理解是,這些屬性是從第三方oAuth提供商Google,Facebook,Twitter或GitHub在用戶登錄後檢索的。在基於密碼的身份驗證的情況下,它們不可用或可從管理控制檯查看。
我可以存儲密碼身份驗證帳戶的此信息,如果可以,我可以通過管理控制檯查看/管理此信息?
順便說一句:我知道這可以存儲在實時數據庫下的users
節點/分支,但我問的是將這些信息存儲在Firebase身份驗證系統中。
// Updates the user attributes:
user.updateProfile({
displayName: "Jane Q. User",
photoURL: "https://example.com/jane-q-user/profile.jpg"
}).then(function() {
// Profile updated successfully!
// "Jane Q. User"
var displayName = user.displayName;
// "https://example.com/jane-q-user/profile.jpg"
var photoURL = user.photoURL;
}, function(error) {
// An error happened.
});
// Passing a null value will delete the current attribute's value, but not
// passing a property won't change the current attribute's value:
// Let's say we're using the same user than before, after the update.
user.updateProfile({photoURL: null}).then(function() {
// Profile updated successfully!
// "Jane Q. User", hasn't changed.
var displayName = user.displayName;
// Now, this is null.
var photoURL = user.photoURL;
}, function(error) {
// An error happened.
});