mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 14:42:59 +03:00
🚀 Feature: Custom claims for clients (fetched from HTTP endpoint) #114
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ItalyPaleAle on GitHub.
Feature description
It would be helpful to be able to add custom claims to the ID or access tokens per each client.
These claims could be hardcoded (configured in the UI) or ideally could be fetched from a HTTP(S) endpoint. During the authentication flow, Pocket ID would invoke the HTTP(S) endpoint with information about the user that is signing in, and the endpoint would respond with claims to add to the ID and/or access tokens.
Pitch
Applications often need to add claims to tokens that are specific to the user.
Examples include adding information from internal databases (think, organization name, or specific permissions, etc).
Personally, I would like to migrate one of my apps from Auth0 to Pocket ID, but I need to be able to add claims to the tokens that are specific to each user.
Most other IdP's have similar features, where custom claims can be added per client (either by invoking an endpoint, or sometimes by executing code directly in the IdP)
@savely-krasovsky commented on GitHub:
If I understood correctly #890,
client_credentialsflow will able to use those claims in issuedaccess_tokens.