@habityzer/nuxt-symfony-kinde-layer 2.3.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 +14 -0
- package/nuxt.config.ts +1 -1
- package/package.json +1 -1
- package/server/api/symfony/[...].ts +7 -20
- package/server/middleware/auth-guard.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
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
|
+
|
|
8
|
+
# [2.4.0](https://github.com/Habityzer/nuxt-symfony-kinde-layer/compare/v2.3.0...v2.4.0) (2026-03-16)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Add support from native login ([5c40492](https://github.com/Habityzer/nuxt-symfony-kinde-layer/commit/5c4049205c7376c41d76ba14aeaf0d0362c5937e))
|
|
14
|
+
|
|
1
15
|
# [2.3.0](https://github.com/Habityzer/nuxt-symfony-kinde-layer/compare/v2.2.2...v2.3.0) (2026-02-21)
|
|
2
16
|
|
|
3
17
|
|
package/nuxt.config.ts
CHANGED
|
@@ -97,7 +97,7 @@ export default defineNuxtConfig({
|
|
|
97
97
|
assertRequiredString(kindeModuleCookie.prefix, 'kindeAuth.cookie.prefix')
|
|
98
98
|
assertRequiredString(kindeModuleConfig.authDomain, 'kindeAuth.authDomain')
|
|
99
99
|
assertRequiredString(kindeModuleConfig.clientId, 'kindeAuth.clientId')
|
|
100
|
-
|
|
100
|
+
// clientSecret is optional for Frontend/PKCE apps
|
|
101
101
|
assertRequiredString(kindeModuleConfig.redirectURL, 'kindeAuth.redirectURL')
|
|
102
102
|
assertRequiredString(kindeModuleConfig.logoutRedirectURL, 'kindeAuth.logoutRedirectURL')
|
|
103
103
|
}
|
package/package.json
CHANGED
|
@@ -47,7 +47,9 @@ export default defineEventHandler(async (event) => {
|
|
|
47
47
|
|
|
48
48
|
// Skip authentication for public routes
|
|
49
49
|
if (isPublicRoute) {
|
|
50
|
-
|
|
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
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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
|
}
|