mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 09:13:19 +03:00
🚀 Feature: Claim field override or custom per service mapping templating #96
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 @Ulrar on GitHub.
Feature description
Some basic templating support in the Custom Claims section of the user, to override fields such as email with something like
$serviceName. There may be a better way of doing this, that's just the first thing that came to mind.Pitch
I realize this is a bit of a niche use case, but I use a different email address per service. Currently PocketID just sends whatever it has as the user's email to the apps in the claim, which mean all of these apps are using the PocketID specific email address of my user, instead of their own.
But I'm sure there's other use cases for templated custom mapping fields.
@ItalyPaleAle commented on GitHub:
Indeed, having to maintain an API is the price you pay.
The benefits are that it's a lot more flexible (you can interact with external DBs, for example), and it doesn't require implementing a new DSL, which would result in a lot of things asked for the future.
@Ulrar commented on GitHub:
@ItalyPaleAle there's already a way to add custom fields from the UI, but as far as I know it only takes plain text. I suppose fetching these from http may work but then I'd have to make and maintain an api for that, it's not ideal
@ItalyPaleAle commented on GitHub:
Would #781 be a way for you to implement this?