linkMicrosoftAuthentication method
Future<MicrosoftAccount>
linkMicrosoftAuthentication(
- Session session, {
- required UuidValue authUserId,
- required MicrosoftAccountDetails accountDetails,
- Transaction? transaction,
Adds a Microsoft authentication to the given authUserId.
Returns the newly created Microsoft account.
The transaction parameter can be used to perform the database operations
within an existing transaction.
Implementation
Future<MicrosoftAccount> linkMicrosoftAuthentication(
final Session session, {
required final UuidValue authUserId,
required final MicrosoftAccountDetails accountDetails,
final Transaction? transaction,
}) async {
return await MicrosoftAccount.db.insertRow(
session,
MicrosoftAccount(
userIdentifier: accountDetails.userIdentifier,
email: accountDetails.email,
authUserId: authUserId,
),
transaction: transaction,
);
}