auth icon indicating copy to clipboard operation
auth copied to clipboard

Include user image to the auth table (from initials generated to social platform generation)

Open bossjapzz opened this issue 3 years ago • 4 comments

Feature request

Include user image to the auth table (from initials generated to social platform generation)

From AppWrite (A supabase open source alternative) users-section4

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.

bossjapzz avatar Feb 21 '22 15:02 bossjapzz

Hey!

Thanks for the query - can I clarify that this is for displaying profile images on the dashboard user management interface?

J0 avatar Feb 09 '23 05:02 J0

Going to close for now - will log as feedback for consideration but feel free to re-open if this is still an issue!

J0 avatar Feb 15 '23 03:02 J0

+1

WarrenGreen avatar Sep 16 '23 14:09 WarrenGreen

+1 for this, we wanted to migrate from firebase, they are providing the photo_url, but not supabase(it depends on provider)

kasvith avatar Oct 12 '23 22:10 kasvith