auth
auth copied to clipboard
Include user image to the auth table (from initials generated to social platform generation)
Feature request
Include user image to the auth table (from initials generated to social platform generation)
From AppWrite (A supabase open source alternative)
From Firebase
// Retrieving user photo
val user = Firebase.auth.currentUser
user?.let {
for (profile in it.providerData) {
// Id of the provider (ex: google.com)
val providerId = profile.providerId
// UID specific to the provider
val uid = profile.uid
// Name, email address, and profile photo Url
val name = profile.displayName
val email = profile.email
val photoUrl = profile.photoUrl
}
}
// Updating user photo
val user = Firebase.auth.currentUser
val profileUpdates = userProfileChangeRequest {
displayName = "Jane Q. User"
photoUri = Uri.parse("https://example.com/jane-q-user/profile.jpg")
}
user!!.updateProfile(profileUpdates)
.addOnCompleteListener { task ->
if (task.isSuccessful) {
Log.d(TAG, "User profile updated.")
}
}
Firebase and AppWrite also knows what image to show Example: a. if user sign up via email/password (We can use name initials as photo) b. if it is based on 3rd party sign up e.g. Facebook or Twitter use that photo from the platform
This makes it by default user has a photo depend on what method of sign up.
Hey!
Thanks for the query - can I clarify that this is for displaying profile images on the dashboard user management interface?
Going to close for now - will log as feedback for consideration but feel free to re-open if this is still an issue!
+1
+1 for this, we wanted to migrate from firebase, they are providing the photo_url, but not supabase(it depends on provider)