Skip to content

Commit

Permalink
api: add sentry user logging on login endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
alecananian committed Dec 10, 2024
1 parent ee5906e commit 8f02144
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/api/src/routes/auth.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as Sentry from "@sentry/node";
import {
DEFAULT_TDK_CHAIN_ID,
type UserContext,
Expand Down Expand Up @@ -197,6 +198,11 @@ export const authRoutes =
thirdwebUser = thirdwebUserDetails;
}

Sentry.setUser({
id: userId,
username: address,
});

const { emailAddresses, externalWalletAddresses } =
parseThirdwebUserLinkedAccounts(thirdwebUser);
const [user, profile, legacyProfiles] = await Promise.all([
Expand Down

0 comments on commit 8f02144

Please sign in to comment.