Hi @yasin,
Welcome to the Auth0 Community!
First, I’d like to clarify that when using Actions, the following Triggers will not work with Social Logins:
- Pre-User Registration
- Post-User Registration
- Post-Change Password
- Send Phone Message
The only Trigger that will work with SSO is the Post Login Action. Note that the Machine-to-Machine Action is irrelevant to user authentication.
With that said, I recommend that you follow option 2 to accomplish your desired result. I have seen your new Set User Metadata Is Not Working Inside Post Login Action post and will address how to use Actions to make this work.
Please let me know if there are any other related questions. I’d be happy to clarify.
Thank you.