openmobilehub / android-omh-auth

Apache License 2.0
4 stars 1 forks source link

Auth Sample App Fails to Retrieve Profile Image #33

Closed dzuluaga closed 8 months ago

dzuluaga commented 8 months ago

The OMH Auth Sample App successfully retrieves all the profile information except for the profile image. Despite ensuring that the profile image exists and is accessible through the OMH platform directly, the sample app does not display or fetch the image. All other profile information is retrieved and displayed correctly. Am I missing anything?

andrei-zgirvaci commented 8 months ago

Hey Diego, thanks for bringing this up! For which providers the profile picture don't work?

In case of Microsoft, the /me endpoint doesn't return a profile picture so we are defaulting it to null.

In case of Facebook there is a current issue where the profile picture URL returns 404. This is weird as it was working 2 weeks ago on the same build. It might be related to the recent Meta outrage. One thing we can try is to change the Facebook OMH App from Development to Live. However, we need to publish it from the Meta for Developers console which requires the business to be verified.

dzuluaga commented 8 months ago

Thanks for the update, Andrei. I've noticed the issue with both Facebook and Outlook. Dropbox hasn't been tested yet. Understanding that certain limitations or outages with APIs might prevent us from retrieving profile pictures, could we consider implementing a placeholder image? This would help avoid leaving a blank space, providing a clearer indication to users when an image isn't available.

andrei-zgirvaci commented 8 months ago

In case of FB, they are providing us a URL, it's just it returns 404 when accessed. However, on providers that don't return a URL at all(Microsoft), we can add a placeholder for sure. Are you suggesting to just display it in the sample app or return it from the OmhUserProfile?

adamTrz commented 8 months ago

In case of FB, they are providing us a URL, it's just it returns 404 when accessed. However, on providers that don't return a URL at all(Microsoft), we can add a placeholder for sure. Are you suggesting to just display it in the sample app or return it from the OmhUserProfile?

I would add it for sample app. I guess in "real life" developers should be able to handle those cases on their own? Wdyt?

andrei-zgirvaci commented 8 months ago

I have set a default placeholder image for providers that don't return a profile picture(Microsoft) in https://github.com/openmobilehub/android-omh-auth/pull/37/commits/450e0efa8534f4eaed93d1a29b99442b2984f924.

However, the profile picture in the case for FB will still display as blank as we are getting a profile picture URL, but it's not accessible.