Set App Metadata for Social Media Account Creation

I’m setting app metadata as recommended by the documentation in a Pre User Registration Action, but it seems that when users use a social media login, the Pre User Registration actions don’t apply.
To fix this issue, I added the same logic to a Login action, but this also doesn’t seem to work when an account is first created and the first auth token is generated. The App Metadata for the user only gets set after the user logs out and logs back in again, then the Login action actually fires.
How in the world do I add app metadata for a social media account user the first time they register without forcing them to log out and log back in?

Hey @jaromp welcome to the community!

That’s correct, a Pre User Registration action won’t run for social logins, only Database or Passwordless.

One option would be to implement silent auth after the user has logged in - This should guarantee that the metadata is included. Most Auth0 SDKs provide silent auth functionality.