This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

refactor: centralize auth logging

+6 -7
+1 -2
src/webapp/app/api/auth/me/route.ts
··· 2 2 import type { GetProfileResponse } from '@/api-client/ApiClient'; 3 3 import { cookies } from 'next/headers'; 4 4 import { isTokenExpiringSoon } from '@/lib/auth/token'; 5 - 6 - const ENABLE_AUTH_LOGGING = true; 5 + import { ENABLE_AUTH_LOGGING } from '@/lib/auth/constants'; 7 6 8 7 const backendUrl = 9 8 process.env.NEXT_PUBLIC_API_BASE_URL || 'http://127.0.0.1:3000';
+1 -2
src/webapp/hooks/useAuth.tsx
··· 17 17 import posthog from 'posthog-js'; 18 18 import { isInternalUser, isEarlyTester } from '@/lib/userLists'; 19 19 import { shouldCaptureAnalytics } from '@/features/analytics/utils'; 20 - 21 - const ENABLE_AUTH_LOGGING = true; 20 + import { ENABLE_AUTH_LOGGING } from '@/lib/auth/constants'; 22 21 23 22 interface AuthContextType { 24 23 user: GetProfileResponse | null;
+1
src/webapp/lib/auth/constants.ts
··· 1 + export const ENABLE_AUTH_LOGGING = true;
+1 -1
src/webapp/lib/auth/token.ts
··· 1 - const ENABLE_AUTH_LOGGING = true; 1 + import { ENABLE_AUTH_LOGGING } from '@/lib/auth/constants'; 2 2 3 3 export const isTokenExpiringSoon = ( 4 4 token: string | null | undefined,
+1 -1
src/webapp/services/auth/CookieAuthService.client.ts
··· 1 1 const appUrl = process.env.NEXT_PUBLIC_APP_URL || 'http://127.0.0.1:4000'; 2 2 3 - const ENABLE_AUTH_LOGGING = true; 3 + import { ENABLE_AUTH_LOGGING } from '@/lib/auth/constants'; 4 4 5 5 export class ClientCookieAuthService { 6 6 // Note: With HttpOnly cookies, we cannot read tokens from document.cookie
+1 -1
src/webapp/services/auth/CookieAuthService.server.ts
··· 1 1 import { cookies } from 'next/headers'; 2 2 3 - const ENABLE_AUTH_LOGGING = true; 3 + import { ENABLE_AUTH_LOGGING } from '@/lib/auth/constants'; 4 4 5 5 export interface AuthTokens { 6 6 accessToken: string | null;