Firebase v3 Auth предлагает метод updateProfile
, который передает displayName
и photoURL
в Firebase.Firebase v3 updateProfile Метод
Я понимаю, что эти свойства получены от сторонних поставщиков OAuth Google, Facebook, Twitter или GitHub при входе пользователя в систему. В случае аутентификации на основе пароля они недоступны или доступны из консоли администратора.
Могу ли я сохранить эту информацию для учетных записей Auth, и если да, то могу ли я просмотреть/администрировать эту информацию через консоль администратора?
BTW: Я знаю, что это может быть сохранено в базе данных реального времени под узлом/веткой users
, но я прошу сохранить эту информацию в системе Firebase Auth.
// 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.
});