I want to link my name and profile picture to my email address in Firebase.

Asked 2 years ago, Updated 2 years ago, 100 views

What you're doing now
·Log in with your email address and password

I was able to log in with Firebase, but I would like to link my name and profile picture to my account if possible.What kind of code should I write to do this?

swift ios swift3 firebase xcode8

2022-09-30 19:49

1 Answers

The Swift code is as follows

let changeRequest=FIRAuth.auth()?currentUser?profileChangeRequest()
changeRequest ?.photoURL=photoURL
changeRequest ?.commitChanges(){(error)in
  // ...
}

There is a code for managing users of Firebase documents.
Check it out for the latest information.

https://firebase.google.com/docs/auth/ios/manage-users?hl=ja#update_a_users_profile


2022-09-30 19:49

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.