Seamless account linking without re-prompt for username password

Continuing the discussion from Account linking with Auth0 actions:

Can you please share the code snippet @alexab. I am trying to find out which “action/rule” did you end up using and when you replaced event.user in your action/rule; was that returned from your server function and if so how did the server function compose that object? did that come from management API inside server function call and if that then which API management method did you use to get that object.

Also, last but not least using your method, for the first login was the scope list in sync? since the JWT token may have been created with scopes before the merge call to the function was made.

Thank you.