You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
auth: {
// @ts-ignore (isEnabled boolean type)
//BE CAREFULL, With visual studio debugger isEnabled can't be false, fails... issue opened
isEnabled : true, //all environment variables are strings
baseURL : `${process.env.NUXT_BASE_URL}/api/auth`, // The origin is set to the development origin. Change this when deploying to production by setting `origin` in this config before build-time or by exporting `AUTH_ORIGIN` by running `export AUTH_ORIGIN=...`
// Whether to add a global authentication middleware that will protect all pages without exclusion
globalAppMiddleware : true,
provider : { type: 'authjs' },
sessionRefresh : {
enablePeriodically : 86400000, //refresh the session every day
enableOnWindowFocus : true
}
},
go to localhost:3000
Server responses with error 500 and
error {
url: '/',
statusCode: 500,
statusMessage: '',
message: 'Invalid URL',
stack: '<pre><span class="stack internal">at new URL (node:internal/url:816:29)</span>\n' +
'<span class="stack internal">at /home/web/var/www/site/node_modules/@sidebase/nuxt-auth/dist/runtime/composables/authjs/utils/navigateToAuthPage.js:15:31</span>\n' +
'<span class="stack internal">at runNextTicks (node:internal/process/task_queues:65:5)</span>\n' +
'<span class="stack internal">at process.processImmediate (node:internal/timers:459:9)</span>\n' +
'<span class="stack internal">at process.callbackTrampoline (node:internal/async_hooks:130:17)</span>\n' +
'<span class="stack internal">at async Object.callAsync (/home/web/var/www/site/node_modules/unctx/dist/index.mjs:72:16)</span>\n' +
'<span class="stack internal">at async Object.callAsync (/home/web/var/www/site/node_modules/unctx/dist/index.mjs:72:16)</span>\n' +
'<span class="stack internal">at async /home/web/var/www/site/node_modules/nuxt/dist/pages/runtime/plugins/router.js:180:26</span></pre>'
}
3. Automatic, (without any action), redirects to http://localhost:3000/login?callbackUrl=http://localhost:3000/
If i turn globalAppMiddleware to false, works OK
Describe the bug
i have this config:
auth: {
// @ts-ignore (isEnabled boolean type)
//BE CAREFULL, With visual studio debugger isEnabled can't be false, fails... issue opened
isEnabled : true, //all environment variables are strings
baseURL : `${process.env.NUXT_BASE_URL}/api/auth`, // The origin is set to the development origin. Change this when deploying to production by setting `origin` in this config before build-time or by exporting `AUTH_ORIGIN` by running `export AUTH_ORIGIN=...`
// Whether to add a global authentication middleware that will protect all pages without exclusion
globalAppMiddleware : true,
provider : { type: 'authjs' },
sessionRefresh : {
enablePeriodically : 86400000, //refresh the session every day
enableOnWindowFocus : true
}
},
go to localhost:3000
Server responses with error 500 and
error {
url: '/',
statusCode: 500,
statusMessage: '',
message: 'Invalid URL',
stack: '<pre><span class="stack internal">at new URL (node:internal/url:816:29)</span>\n' +
'<span class="stack internal">at /home/web/var/www/site/node_modules/@sidebase/nuxt-auth/dist/runtime/composables/authjs/utils/navigateToAuthPage.js:15:31</span>\n' +
'<span class="stack internal">at runNextTicks (node:internal/process/task_queues:65:5)</span>\n' +
'<span class="stack internal">at process.processImmediate (node:internal/timers:459:9)</span>\n' +
'<span class="stack internal">at process.callbackTrampoline (node:internal/async_hooks:130:17)</span>\n' +
'<span class="stack internal">at async Object.callAsync (/home/web/var/www/site/node_modules/unctx/dist/index.mjs:72:16)</span>\n' +
'<span class="stack internal">at async Object.callAsync (/home/web/var/www/site/node_modules/unctx/dist/index.mjs:72:16)</span>\n' +
'<span class="stack internal">at async /home/web/var/www/site/node_modules/nuxt/dist/pages/runtime/plugins/router.js:180:26</span></pre>'
}
3. Automatic, (without any action), redirects to http://localhost:3000/login?callbackUrl=http://localhost:3000/
If i turn globalAppMiddleware to false, works OK
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Hi @agracia-foticos , thanks a lot for your report about v0.10! This data is valuable as there were lots of breaking changes and internal refactoring.
As our company is on a vacation, we could only get back to Sidebase work in the first/second week of January 2025.
Sorry for a wait
Actually, I think I have done the migration correctly, since if I disable the globalAppMiddleware I can log in and out without problems.
But when i put globalAppMiddleware to true, the first page its a 500 error (the trace of error its in this page)and automatically redirects me correctly to login page
Environment
Linux
v22.8.0
3.14.1592
3.17.1
2.10.4
[email protected]
-
-
-
-
Reproduction
i have this config:
Describe the bug
i have this config:
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: