MCPcopy Create free account
hub / github.com/AnswerOverflow/AnswerOverflow / identifyAccount

Function identifyAccount

packages/core/src/auth.ts:446–462  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

444 return true;
445 }
446 const identifyAccount = async () => {
447 Analytics.linkAnalyticsAccount({
448 answerOverflowAccountId: user.id,
449 otherId: account.providerAccountId,
450 });
451 if (account?.provider === 'discord' && account?.access_token) {
452 const discordAccount = await getDiscordUser({
453 accessToken: account.access_token,
454 });
455 Analytics.identifyDiscordAccount(user.id, {
456 id: discordAccount.id,
457 username: discordAccount.username,
458 email: discordAccount.email ?? '',
459 });
460 }
461 return Analytics.finishAnalyticsCollection();
462 };
463 const updateAccountInfo = async () => {
464 const foundAccount = await findAccountByProviderAccountId({
465 provider: account.provider,

Callers 1

signInFunction · 0.85

Calls 1

getDiscordUserFunction · 0.85

Tested by

no test coverage detected