linkGoogleAuthentication method
Future<GoogleAccount>
linkGoogleAuthentication(
- Session session, {
- required UuidValue authUserId,
- required GoogleAccountDetails accountDetails,
- Transaction? transaction,
Adds a Google authentication to the given authUserId
.
Returns the newly created Google account.
Implementation
Future<GoogleAccount> linkGoogleAuthentication(
final Session session, {
required final UuidValue authUserId,
required final GoogleAccountDetails accountDetails,
final Transaction? transaction,
}) async {
return await GoogleAccount.db.insertRow(
session,
GoogleAccount(
userIdentifier: accountDetails.userIdentifier,
email: accountDetails.email.toLowerCase(),
authUserId: authUserId,
),
transaction: transaction,
);
}