Handles the addition of an OAuth provider for the user.
This function opens a modal-driven flow for linking a new OAuth provider (Google, Apple, or Facebook) to the user’s account.
It supports all enabled OAuth providers as defined in the configuration and dynamically triggers the appropriate OAuth flow.
Uses the handleGoogleOauth, handleAppleOauth, and handleFacebookOauth functions to initiate the provider-specific OAuth authentication process.
After successful authentication, the provider is linked to the user’s account and a success page is shown.
Automatically refreshes the user details state after linking to ensure the latest provider list is available in the provider.
Optionally allows specifying the stamper to use for the addition (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
Handles all error cases and throws a TurnkeyError with appropriate error codes.