Comments (5)
I was thinking that both Gravatar and OAuth Avatar could be enabled at the same time and that we practically just do
var avatarUrl =
(OAuthAvatar.Enabled ? OAuthAvatarUrl : null)
?? (Gravatar.Enabled ? GravatarAvatarUrl : null)
?? MissingProfile.png
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. :)
from opengist.
Hi, thanks for the thoughts!
I'm not into uploading and storing pictures via Opengist.. but instead having an url pointing to an image.
It would be ok to have an option to disable gravatar, either in the config.yml or via the admin panel.
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 ?
from opengist.
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:
- "Use Gravatar" option
- "Use avatar from OAuth provider" option
And fallback to an anonymous profile.png otherwise.
What should be stored in db? A single avatar_url
string which will be updated on every OAuth authentication?
from opengist.
Your idea of avatar_url
sounds good.
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
from opengist.
I would have replaced null
s with MissingProfile.png
; also with your logic there you cant use your Gravatar pic if you log in with an OAuth provider, but it's actually fine by me since i want to keep this simple for now :)
If you have some spare time to implement this, i would be glad to see your contribution :)
from opengist.
Related Issues (20)
- [Feature request] PWA HOT 1
- Spacing between Avatar and title missing on some Gists
- Own Logo over text on mobile
- [Feature request] Helm chart HOT 1
- Mermaid diagram causing syntax error
- [Feature request] Proxy Auth
- [Feature Request]: Disable registration HOT 2
- [Feature request]: Custom links in main address bar
- [BUG]: Markdown preview button missing when editing a gist HOT 3
- [FEAT]: Add markdown alerts (admonition) support HOT 7
- Option to hide revisions for public gists + group gists by folders
- Restrict login and registration to OIDC HOT 2
- Opengist Container Shutdown Randomly After update to version v1.7.2 HOT 3
- Rich Text Format HOT 1
- Wrong visibility interaction when RequireLogin = true HOT 2
- Copy to clipboard fails silently with macOS Safari when served remotely via http (not https) HOT 1
- It is recommended to add AI support HOT 2
- Demo HOT 2
- 可以指定用户有修改其他人代码的权限吗?或者允许用户自行创建用户组,可以互相修改代码,保留历史记录。
- Traefik Reverse Proxy & SSH
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opengist.