social-common / pragma.account / AccountPlugin / onAccountLink /

onAccountLink #

abstract suspend fun onAccountLink(pragmaAccount: PragmaAccount, idProviderAccount: IdProviderAccount)

Called before a user links their account with a new identity provider Use this to perform any actions before an account link is created Or throw an application error to prevent the link from being persisted

Used by

  • AccountService.linkIdentityProviderAccountV2
  • AccountService.linkIdentityProviderAccountPartnerV1
  • AccountService.linkIdentityProviderAccountServiceV1

Parameters #

pragmaAccount

PragmaAccount of the user

idProviderAccount

IdProviderAccount for the account being linked