Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avatars (or all images?) should go through proxy/authentication and be cached #821

Closed
shiftkey opened this issue Jan 18, 2017 · 35 comments
Closed
Assignees
Milestone

Comments

@shiftkey
Copy link
Member

No description provided.

@joshaber
Copy link
Contributor

joshaber commented Feb 9, 2017

They should also be authenticated for Enterprise instances.

@joshaber joshaber changed the title avatars (or all images?) should go through proxy and be cached Avatars (or all images?) should go through proxy/authentication and be cached Mar 27, 2017
@joshaber
Copy link
Contributor

I'm thinking we could treat this as a stretch goal for M4. I think it should definitely happen before 1.0, but as-is we're on-par with Classic.

Thoughts?

@joshaber
Copy link
Contributor

joshaber commented Apr 4, 2017

For posterity, @niik and I talked about this a bit and it should probably be implemented as a service worker.

@joshaber
Copy link
Contributor

From https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API:

Service workers only run over HTTPS, for security reasons.

I don't feel like I have enough context to know, but could this be a problem for Enterprise customers?

@shiftkey
Copy link
Member Author

I don't feel like I have enough context to know, but could this be a problem for Enterprise customers?

Technically you can run GHE over HTTP despite it being highly discouraged for all sorts of reasons - there's probably some old threads about it we can find to see how badly this will break for them. These days it's mostly the self-signed certificate hassles (e.g. trialing GHE) that we'd need to handle, and if we're adding support for adding self-signed certificates in the app then that should be covered.

@joshaber
Copy link
Contributor

And I suppose worst case it's just avatars that break.

@joshaber joshaber self-assigned this Apr 18, 2017
@shiftkey
Copy link
Member Author

I guess if we can serve up a placeholder image in case of failure then it's okay?

@joshaber
Copy link
Contributor

It looks like this may not be possible right now: https://github.com/github/github/issues/71916

I'll wait and see what response that issue gets, but I imagine we'll have to punt this.

@joshaber
Copy link
Contributor

Based on the initial response, it sounds like this is currently not possible. Avatars won't authenticate with a token.

I'll keep this open, but I'm 👢'ing it from M4.

@joshaber joshaber removed their assignment Apr 21, 2017
@NickCraver
Copy link
Contributor

Just hit missing avatars on enterprise instances. I manually authenticated inside electron via window.location = '<url>'; and did 2-factor auth...now I have avatars.

It's a crappy workaround, but visually this is the most visible missing piece in the current UI for enterprise customers, IMO. Aside from that, I'm liking this thing :)

@shiftkey
Copy link
Member Author

I manually authenticated inside electron via window.location = ''; and did 2-factor auth...now I have avatars.

Yeah, inside the renderer process we do have the ability to assign cookies from a valid GitHub session, which would explain how that workaround succeeds, but we've avoided doing the entire auth process completely in there (because security?).

Aside from that, I'm liking this thing :)

💖

@niik
Copy link
Member

niik commented May 16, 2017

I manually authenticated inside electron via window.location = ''; and did 2-factor auth...now I have avatars.

lrlknxa

@alrz
Copy link

alrz commented May 17, 2017

I guess if we can serve up a placeholder image in case of failure then it's okay?

Please!

@hparadiz
Copy link

hparadiz commented Aug 24, 2017

This is still an issue. It's a BUG!!!! Not an "enhancement".
image

Eight months since the issue was reported and still nothing?

@shiftkey
Copy link
Member Author

@hparadiz are you connecting to GitHub or a GitHub Enterprise instance?

@hparadiz
Copy link

@shiftkey Enterprise

@shiftkey
Copy link
Member Author

@hparadiz cool.

So an update on this - even with providing a valid token, there's situations where Enterprise won't return the avatar to Desktop. We're talking with the Enterprise team to get this fixed, which will then take time to reach customers in an update. Apologies for the delay.

@icarnaghan
Copy link

Subscribing - I have the same issue.

@sergeyspatar
Copy link

sergeyspatar commented Oct 13, 2017

Version 1.0.4 still has this bug. Avatars from GHE are not displayed.

@joshaber
Copy link
Contributor

Yes, this is currently blocked by some required work on GitHub Enterprise.

@shiftkey
Copy link
Member Author

Bumping this thread as we've not had much movement on this from our end - a few people have suggested re-implementing Gravatar support as a fallback that we had in the classic apps.

@desktop/core unless there's any objections to this I'll throw it on my plate this week to estimate the work involved.

@haacked
Copy link
Contributor

haacked commented Oct 30, 2017

It may seem cosmetic, but displaying a broken image icon is worse than even just showing a placeholder image. It reduces confidence in the application. So I'm 👍 to doing something here.

The gravatar fallback seems like a good start. Gravatar itself has a fallback mechanism. So the fallback sequence would be:

  1. GHE avatar
  2. Gravatar
  3. Placeholder

We should never show a broken image here.

@haacked
Copy link
Contributor

haacked commented Oct 30, 2017

We should never show a broken image here.

Now that I've said that, say hello to my upcoming new profile image.

broken-image

:trollface:

@haacked haacked closed this as completed Oct 30, 2017
@haacked haacked reopened this Oct 30, 2017
@shiftkey shiftkey self-assigned this Oct 31, 2017
@shiftkey shiftkey added this to the 1.0.x milestone Oct 31, 2017
@shiftkey shiftkey removed their assignment Nov 20, 2017
@ausiddiqui
Copy link

on 1.0.9 and the broken image is now a default robot in the commit summary / description box area (for a logged in Enterprise repo), but still a broken image under Preferences > Accounts.

screen shot 2017-11-29 at 10 59 27 am

screen shot 2017-11-29 at 10 59 41 am

@icarnaghan
Copy link

I'm seeing the robot too, but I'm also seeing broken avatar images in my history list.

@say25
Copy link
Member

say25 commented Dec 6, 2017

@shiftkey I know the current solution is to use Gravatar for fallback, do you know if the GitHub enterprise team will be able to do the work required to not require Gravatar fall back in the future?

@shiftkey
Copy link
Member Author

shiftkey commented Dec 6, 2017

@say25 it's an ongoing discussion with the team, and even after a fix lands it would require GitHub Enterprise administrators to update their instances.

I've made a big dent into this in #3513, so please follow along with that PR and we'll see if we can make this experience better in the short-term.

@keithy
Copy link

keithy commented Feb 15, 2023

Still not fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

16 participants