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

Refresh identity traits on social / SSO login #2898

Open
4 of 6 tasks
aeneasr opened this issue Nov 16, 2022 · 6 comments
Open
4 of 6 tasks

Refresh identity traits on social / SSO login #2898

aeneasr opened this issue Nov 16, 2022 · 6 comments
Labels
feat New feature or request.

Comments

@aeneasr
Copy link
Member

aeneasr commented Nov 16, 2022

Preflight checklist

Describe your problem

Currently, social sign in only executes the JsonNet during registration. However, multiple questions have come up in several issues how this can be solved for linking sign ins, or when the user sign ins again - to keep the data fresh.

Example of such a discussion: ory/network#164 (comment) (there are more!)

Describe your ideal solution

The jsonnet should be executed on sign in and on linking social sign in as well. It will have to respect the existing user data as well (so it needs to be available in the context).

Workarounds or alternatives

There are no workarounds for this.

Version

master

Additional Context

No response

@aeneasr aeneasr added the feat New feature or request. label Nov 16, 2022
@netthier
Copy link

Already posted this in one of the other issues, but I'm wondering what would happen to the user data if the Jsonnet code and schema are changed between logins.
Would the user be effectively recreated with the most recent schema and Jsonnet, or would some old version be run?

@aeneasr
Copy link
Member Author

aeneasr commented Nov 16, 2022

We would add the current identity data to the jsonnet context, and then it's your decision

@netthier
Copy link

Has there been any progress on this?

@kmherrmann
Copy link
Contributor

We've added the ability to update identities from webhooks, see here: https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#update-identity-traits

Would that solve the problem for you?

@netthier
Copy link

We've added the ability to update identities from webhooks, see here: https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#update-identity-traits

Would that solve the problem for you?

No, as I need the update to happen during sign-in and the docs state the following:

Modifying the identity is currently only possible during the registration and settings flows.

In my case an external social login is the source of truth for identity data. I want the Jsonnet logic that constructs the identity from the JWT to run on every sign-in, potentially updating out-of-sync values.

@kmherrmann
Copy link
Contributor

I see, makes sense, thanks. I'll add it to the backlog, but a PR would accelerate it :)

@kmherrmann kmherrmann changed the title Refresh identity traits when performing social sign in / linking new social sign ins Refresh identity traits on social / SSO login Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

3 participants