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

🚀 Feature: Allow custom claims #25

Open
tiehfood opened this issue Sep 5, 2024 · 7 comments
Open

🚀 Feature: Allow custom claims #25

tiehfood opened this issue Sep 5, 2024 · 7 comments
Labels
feature New feature or request

Comments

@tiehfood
Copy link

tiehfood commented Sep 5, 2024

Feature description

Would be great if I could add custom claims to the token and set the content in the user settings page.

Pitch

Some applications scrape additional information from claims. That could be a customer number, a group number a specific username field or any other information.
Implementation could be very simple. On the user page a button to add a button to create a new textfield. On creation give that field a name that corresponds to the claim name. Value could then be set per user.

@tiehfood tiehfood added the feature New feature or request label Sep 5, 2024
@stonith404
Copy link
Owner

I'm working on support for user groups. Do you think it would make sense to also allow to set custom claims for user groups or is this only necessary for users?

@tiehfood
Copy link
Author

tiehfood commented Sep 9, 2024

For sure that would make sense. Don't know how much effort that is, for my purpose you could keep it very simple :)

Great work

@stonith404
Copy link
Owner

I wanted to provide a quick update: I’ve completed the initial version of this feature, but I’m not entirely satisfied with the current solution. It may take a bit more time to refine it, but rest assured, I haven’t forgotten about this request.

@stonith404
Copy link
Owner

I've just finished the first version. Would you mind to test the stonith404/pocket-id:development image and give me some feedback about what you would change?

@donkevlar
Copy link

I've just finished the first version. Would you mind to test the stonith404/pocket-id:development image and give me some feedback about what you would change?

Hey, I just downloaded your dev image. This is super cool, testing it out now with a few of my apps. Ill report back if I run into any issues. Great work!

@stonith404
Copy link
Owner

@donkevlar Thanks for the feedback. Also let me know if you find something not good in terms of user experience because I've never used custom claims before.

@donkevlar
Copy link

donkevlar commented Oct 27, 2024

So overall works well, my only feedback (which might not be valid because I don't really know much about openID) is that it would be nice to have the groups have some sort of claims available to inherit as users. For example if I add a claim that might be specific to a custom application such as {type: userRole, value: admin}, to do this every time versus just adding them to a group makes things much easier. Again, Im not an OID expert, so not sure if thats done through other means. The current implementation works well on a single user basis though, and I did not have issues parsing a response to the profile scope on my test apps.

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

No branches or pull requests

3 participants