Firebase create user with email, password, display name and photo url

后端 未结 6 1166
死守一世寂寞
死守一世寂寞 2020-12-15 07:17

According to Firebase site, I am using this code to create a new user:

firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error)          


        
6条回答
  •  温柔的废话
    2020-12-15 07:52

    To change/add the display name:

    user!.createProfileChangeRequest().displayName = "Your name"

    To change/add photoURL

    user!.createProfileChangeRequest().photoURL = URL(string: "image url")

提交回复
热议问题