social / pragma.account / AccountService / linkIdentityProviderAccountServiceV1 /
linkIdentityProviderAccountServiceV1 #
suspend fun linkIdentityProviderAccountServiceV1(serviceSession: ServiceSession, request: AccountRpc.LinkIdentityProviderAccountServiceV1Request): AccountRpc.LinkIdentityProviderAccountServiceV1Response
Associates a new Identity Provider with an existing Pragma account while returning valid authentication tokens.
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.NotFoundApplicationError when the existing Id Provider account data is not a part of a Pragma account.
- 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.IdProviderAuthenticationDisabledApplicationError when authenticating with a disabled IdentityProvider.