-
-
Notifications
You must be signed in to change notification settings - Fork 952
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
Custom avatar pictures #2631
Comments
It does appear to be intentional that hidden and other non-editable fields (i.e. static, read-only text) do not have their values saved; I would imagine this protects against users injecting data into fields that the flow writer likely expects to never change. I think the best approach to this, rather than directly supply an "Attachment" prompt type, would be to instead have a "custom" type that accepts HTML and is validated in the editor to have an As for image processing, you can do that from Python with e.g. ImageMagick, though you might need to build your own container to include the necessary libraries; easier would to feed it through PHP or other API. I do that to update my LDAP server when saving user info since authentik does not currently support LDAP attribute writeback. |
What can you do with #3156? Does this solve your issue? I haven't used them myself yet so I am curious too. |
Sorry for the long comment, the longer I think about this the more things I notice :D Problems with using #3156 for avatarsThat PR indeed partially solves the first part, and is a good starting point, but it doesn't really make it possible to use the files as an Avatar as far as I see:
Problems with & requirements of this issueActually, the more that I look into this, the more I notice that this is actually two issues in one:
I'd say let's keep this issue about the avatars and I'll create a new one for the custom fields. Suggestion for
|
Partial reply, bear with
the MIME type is passed to the server (as this isn't a multi-part form post, but rather just base64 encoded Data URI that is in the JSON)
That would be great for a supposed image field that uses the current field with a different UI
Also true, I purposefully dont want to do any validation as that should be done with policies IMO
I like the idea of this, however at that point it might as well be turned into a tenant-level setting instead of a global one
Not sure how I feel about this, reverse proxying gravatar/generic-other-service would have advantages but could also be abused if not done well
I run |
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> #2631
I tried various image croppers now and found Croppie.js to work very well - an image input component for Authentik (although not yet actually working) could look like this then as a UI concept: |
Is your feature request related to a problem? Please describe.
I want to use neither Gravatar nor a completely custom avatar system, but rather the
jpegPhoto
field of LDAP, and want to be able to change that picture in the self-service.Describe the solution you'd like
Being able to add a prompt field with a type "Attachment" and adding a corresponding LDAP property mapping.
Optionally, being able to access that attachment through the API (with configurable access control) with a link, so it can be used for
AUTHENTIK_AVATARS
, as well as other websites.Also optionally, maybe a second type "Attachment (Square Image)" for a cropper? Or generally different settings for different prompt field types, so that could be a sub-setting - stuff like maximum file size, file types, etc. could be additional settings here.
Describe alternatives you've considered
I tried using a "Hidden" prompt field with the following "Help text" to show a file input instead, using a base64 Data-URI for a start:
Issues with that:
<input>
tags (even in the help text) I needed to add a third input (that's why there's the<input type="hidden">
at the end) as it would otherwise take the value of the "file" field instead of the base64-encoded string.Additional context
I'm not sure how much sense it makes to incorporate this as a separate full-fledged avatar feature, hence I suggested using a relatively simple "Attachment" field type.
Coincidentally, I'll also need other custom field types as well at some point (e.g. something as simple as a list of checkboxes, or even some more sophisticated plugins like subscription plan management), so it would be great to have some documentation on how to do that:
window.postMessage
.The text was updated successfully, but these errors were encountered: