curved-ram-6189
01/28/2025, 5:47 PMtoken_hook
to also overwrite the subject with what comes from Kratos.
At the bottom of this document: https://www.ory.sh/docs/hydra/guides/claims-at-refresh it suggests that you cannot update the subject identifier, and I'm wondering if there's a technical (security, performance, etc) reason for this, or if it's just a limitation of the current implementation.magnificent-energy-493
curved-ram-6189
01/28/2025, 7:39 PMassertion
. Then the hope is to create a user in Kratos if one does not already exist that corresponds to the 3rd party user. My understanding of how hydra implements JWT Authorization grant is that by default the token returned contains the subject (sid) claim of the 3rd party identity provider, which is what we're trying to change.
In our case it might be okay to allow overwriting the subject since it's all in a trusted context (two co-located API services that already have a trust relationship).