social / pragma.account / AccountService / linkIdentityProviderAccountV2 /

linkIdentityProviderAccountV2 #

suspend fun linkIdentityProviderAccountV2(session: PlayerSession, request: AccountRpc.LinkIdentityProviderAccountV2Request): AccountRpc.LinkIdentityProviderAccountV2Response

Associates a new Identity Provider with an existing Pragma account.

Plugins

  • IdentityProvider.canAuthenticate
  • IdentityProvider.validate - PragmaResultErrors returned are just thrown as PragmaExceptions
  • AccountPlugin.onAccountLink - Called before a user links their account with a new identity provider

PragmaApplicationErrors

  • pragma.IdProviderNotFoundApplicationError when trying to use an unknown or unconfigured IdentityProvider.
  • AccountRpc.IdProviderLinkedToOtherAccountApplicationError when the Id Provider account is already associated with a Pragma account.
  • AccountRpc.IdProviderAlreadyLinkedToAccountApplicationError when the existing Pragma account already has the requested Id Provider type associated with it.
  • AccountRpc.IdProviderLinkingDisabledApplicationError when trying to link an Id Provider that has linking disabled.
  • AccountRpc.LinkOneAssociationOnlyApplicationError when trying to link a new accountId from a previously existing IdProvider type @see pragma.account.config.IdentityProviderPluginConfig.accountLinkingOneAssociationOnly
  • AccountRpc.LinkCooldownApplicationError when trying to link a new accountId but the existing one was unlinked too recently @see pragma.account.config.IdentityProviderPluginConfig.accountLinkingCooldownInDays