@habityzer/nuxt-symfony-kinde-layer 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.4.1](https://github.com/Habityzer/nuxt-symfony-kinde-layer/compare/v2.4.0...v2.4.1) (2026-03-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Improve logging in Symfony proxy and auth guard middleware ([4613f74](https://github.com/Habityzer/nuxt-symfony-kinde-layer/commit/4613f74fc9d9d6a4ed796675367176d46f1e0a7e))
7
+
1
8
  # [2.4.0](https://github.com/Habityzer/nuxt-symfony-kinde-layer/compare/v2.3.0...v2.4.0) (2026-03-16)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@habityzer/nuxt-symfony-kinde-layer",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Shared Nuxt layer for Symfony + Kinde authentication integration",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -47,7 +47,9 @@ export default defineEventHandler(async (event) => {
47
47
 
48
48
  // Skip authentication for public routes
49
49
  if (isPublicRoute) {
50
- console.log('🔓 [SYMFONY PROXY] Public route, skipping auth:', path)
50
+ if (!process.env.E2E_TEST_MODE) {
51
+ console.log('[SYMFONY PROXY]', event.method, path, '(public)')
52
+ }
51
53
  // Set token to empty to skip auth headers
52
54
  token = ''
53
55
  } else {
@@ -162,19 +164,10 @@ export default defineEventHandler(async (event) => {
162
164
  headers['Accept'] = accept
163
165
  }
164
166
 
165
- // Log the request to backend
166
- const backendUrl = `${config.apiBaseUrl}${path}`
167
- console.log('🔵 [SYMFONY PROXY] Request to backend:', {
168
- url: backendUrl,
169
- method,
170
- headers: {
171
- ...headers,
172
- Authorization: token && token !== '' ? `Bearer kinde_${token.substring(0, 10)}...` : 'none'
173
- },
174
- query,
175
- hasBody: !!body,
176
- isMultipart: contentType.includes('multipart/form-data')
177
- })
167
+ // Log one short line per request (method + path only); skip in e2e to reduce output
168
+ if (!process.env.E2E_TEST_MODE) {
169
+ console.log('[SYMFONY PROXY]', method, path)
170
+ }
178
171
 
179
172
  // Forward request to Symfony with Kinde token
180
173
  const response = await $fetch(path, {
@@ -187,12 +180,6 @@ export default defineEventHandler(async (event) => {
187
180
  timeout: 30000 // 30 second timeout
188
181
  })
189
182
 
190
- console.log('✅ [SYMFONY PROXY] Backend response received:', {
191
- url: backendUrl,
192
- method,
193
- status: 'success'
194
- })
195
-
196
183
  return response
197
184
  } catch (error) {
198
185
  console.error('❌ [SYMFONY PROXY] Symfony API error:', {
@@ -127,6 +127,10 @@ function logServer(event: string, details: Record<string, unknown>) {
127
127
  if (process.env.NODE_ENV === 'production') {
128
128
  return
129
129
  }
130
+ // Only log when explicitly enabled (reduces noise in e2e and dev)
131
+ if (!process.env.NUXT_AUTH_GUARD_DEBUG) {
132
+ return
133
+ }
130
134
 
131
135
  console.warn(`[AUTH GUARD SERVER] ${event}`, details)
132
136
  }