Hi @robinv,
Welcome to the Community!
That is correct, this will not work for social. Hooks only work for DB connections.
If you want to do this after first login for social and db users you must do it via a rule. You could check for a flag in app_metadata, and if it doesn’t exist then change the user_id via a call to the management API then set the flag.
With that said, you might be able to avoid setting a new user id, which could be fairly complicated. Typically, you will set any external id in the app_metadata and then add that id to the token in a custom claim via a rule.
Let me know if you have questions,
Dan