-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Comments
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? |
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 |
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. |
I've just finished the first version. Would you mind to test the |
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! |
@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. |
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. |
@donkevlar Thanks, I've added custom claims to user groups. |
This has been added in cd path-to-pocket-id
docker compose exec pocket-id apk add sqlite
docker compose exec pocket-id sqlite3 backend/data/pocket-id.db "ALTER TABLE app_config_variables DROP COLUMN default_value;" # Doesn't matter if it fails
docker compose exec pocket-id sqlite3 backend/data/pocket-id.db "DROP TABLE IF EXISTS custom_claims;"
docker compose exec pocket-id sqlite3 backend/data/pocket-id.db "UPDATE schema_migrations SET version = '20241023072742', dirty=0;"
nano docker-compose.yml # Change the tag to latest
docker compose pull && docker compose up -d |
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.
The text was updated successfully, but these errors were encountered: