social-common / pragma.account / AccountPlugin / onAccountCreate /
onAccountCreate #
abstract suspend fun onAccountCreate(idProviderAccount: IdProviderAccount): PragmaAccount
Called just before an account is created but after they have completed the initial authentication using the IdentityProvider. This can be used to block account creation by throwing PragmaError.AccountService_Unauthorized. This can also be used to set the user’s displayName, tags, and the groups they belong to.
Used by
- AccountService.authenticateOrCreateV2
Return #
A new instance of PragmaAccount with the desired display name, groups, and tags to be created.
Parameters #
idProviderAccount | IdProviderAccount of the user who just authenticated. |