-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Option to disable Gravatar #23
Comments
Hi, thanks for the thoughts! I'm not into uploading and storing pictures via Opengist.. but instead having an url pointing to an image. So, i would say : either you use Gravatar (if enabled) with your email or enter an url to your picture; and if you're logged in with OAuth we can set the url to the picture according to the provider (https://avatars.githubusercontent.com/u/:github_userid or https://gitea.com/api/v1/users/:gitea_username) What do you think ? |
I get why you're against hosting the images! Saving the url to their oauth provider avatar sounds good enough to me (and don't we already get that data from goth when authenticating?). Do you mean allowing the user to set their own url? That sounds like a privacy risk to me... I'm thinking that this is good enough for the time being:
And fallback to an anonymous profile.png otherwise. What should be stored in db? A single |
Your idea of I can see in the user settings radio buttons to either choose to display the avatar from Gravatar or from the OAuth provider (if both options are enabled of course) Anyway one hitch about this whole feature would be in the revisions list, where you can have multiple users who have committed : right now getting the avatar from Gravatar is based on the git committer email address, but now it would actually need one more database query instead to get avatar urls |
I was thinking that both Gravatar and OAuth Avatar could be enabled at the same time and that we practically just do
does that make sense? The extra query is a valid concern. But it shouldn't have too big of an impact though? (Albeit we are using SQLite atm... :P) I will see if I have the time to experiment with this feature tonight if you're not already on it. :) |
I would have replaced If you have some spare time to implement this, i would be glad to see your contribution :) |
Out of both privacy and self-sufficiency concerns I would like Gravatar to be optional. I can think of a few alternatives for how to do this:
profile.png
asset when the avatar url method is called and this option is disabled. (This would be easier from a frontend POV to not have to consider design when no image is rendered.)profile.png
.I would personally want to see no. 4 in combination with no. 2 and eventually no. 3. I looked at how to implement no. 4 and am not quite sure how it best be done, but storing an
oauthAvatarUrl
on the user may work, and we just make sure to update this on every session renewal and delete on oauth provider deletion. A problem would arise when changing Gitea url in the config though, if we store the full image url from a previous TLD... Thoughts?I've never written anything in Go but I can still give it a shot after we discuss that to implement.
The text was updated successfully, but these errors were encountered: