AccountMerger class

Management functions for merging accounts.

Account merging happens in rare cases when a user adds a new sign-in method to their account, but Serverpod recognizes that IDP as already belonging to a different, pre-existing account. At this point, application developers should offer an account merge to the user, and, if they accept, run the merge method found here.

Constructors

AccountMerger({AccountMergeConfig config = const AccountMergeConfig()})
Creates a new AccountMerger instance.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

merge(Session session, {required UuidValue userToKeepId, required UuidValue userToRemoveId, Transaction? transaction}) Future<void>
Merges the accounts of two AuthUsers.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited