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

feat: update identity data based on id token claims on each login #3788

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

splaunov
Copy link
Contributor

When new identity is registered with OIDC, any attribute from ID Token can be saved into identity data fields like traits, metadata_public and metadata_admin.
But there is no way to change that data on user login. One common use case is to capture groups into metadata_admin on registration and then update list of groups on each next login.

This PR adds logic to update identity data based on ID Token content.

Related issue(s)

Checklist

  • [ x] I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • [x ] I am following the
    contributing code guidelines.
  • [ x] I have read the security policy.
  • [ x] I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • [ x] I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

@luflow
Copy link

luflow commented Mar 11, 2024

@splaunov Isn't this the same idea like #2428?

@splaunov
Copy link
Contributor Author

I would not say it's the same.
#2428 updates the token but not traits and metadata.

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

Successfully merging this pull request may close these issues.

None yet

2 participants