alpha
Login
or
Join now
nandi.uk
/
semble
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
refactor: centralize auth logging
author
pdelfan
date
4 months ago
(Mar 23, 2026, 11:04 AM -0700)
commit
f492fe7e
f492fe7ea9d55a002cae9c41c760637bdd17f17a
parent
b6409272
b6409272c1f7e2163299be9904a7a4a0d4e9bc89
+6
-7
6 changed files
Expand all
Collapse all
Unified
Split
src
webapp
app
api
auth
me
route.ts
hooks
useAuth.tsx
lib
auth
constants.ts
token.ts
services
auth
CookieAuthService.client.ts
CookieAuthService.server.ts
+1
-2
src/webapp/app/api/auth/me/route.ts
View file
Reviewed
···
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
5
-
6
6
-
const ENABLE_AUTH_LOGGING = true;
5
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
View file
Reviewed
···
17
17
import posthog from 'posthog-js';
18
18
import { isInternalUser, isEarlyTester } from '@/lib/userLists';
19
19
import { shouldCaptureAnalytics } from '@/features/analytics/utils';
20
20
-
21
21
-
const ENABLE_AUTH_LOGGING = true;
20
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
View file
Reviewed
···
1
1
+
export const ENABLE_AUTH_LOGGING = true;
+1
-1
src/webapp/lib/auth/token.ts
View file
Reviewed
···
1
1
-
const ENABLE_AUTH_LOGGING = true;
1
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
View file
Reviewed
···
1
1
const appUrl = process.env.NEXT_PUBLIC_APP_URL || 'http://127.0.0.1:4000';
2
2
3
3
-
const ENABLE_AUTH_LOGGING = true;
3
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
View file
Reviewed
···
1
1
import { cookies } from 'next/headers';
2
2
3
3
-
const ENABLE_AUTH_LOGGING = true;
3
3
+
import { ENABLE_AUTH_LOGGING } from '@/lib/auth/constants';
4
4
5
5
export interface AuthTokens {
6
6
accessToken: string | null;