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

User properties when changing context.primaryUser #148

Open
matthieusieben opened this issue Apr 25, 2018 · 0 comments
Open

User properties when changing context.primaryUser #148

matthieusieben opened this issue Apr 25, 2018 · 0 comments

Comments

@matthieusieben
Copy link

matthieusieben commented Apr 25, 2018

So we have this rule that merges a user logging-in into a previously existing identity. As explained in #71, context.primaryUser must be update accordingly in that particular case.

But it is kinda wiered and unclear what happens next when calling callback(null, user, context) with user being the user that was merged into the previous account (the original user that was used to call the rule).

  • More specifically, what will be the user_id of the user in the next rule ?
  • Do we need to update all the properties of user (user.app_metadata, user.user_metadata, user.first_name, etc.) with those of the primary user before calling the next rule, or will Auth0 automatically reload the properties of user if context.primaryUser has changed ?
  • Why shouldn't we call callback(null, otherPrimaryUser, context) (I have the impression that this will cause an Unable to construct sso user. error in some cases, but I can't figure out when) ?
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

No branches or pull requests

1 participant