Next Auth Session timing out

I just created a new T3 project with Drizzle, Next Auth and Supabase. But while working the session keeps timing out and I have to stop the dev server and sign in again for it to work Error logs:
[next-auth][error][adapter_error_getUserByAccount]
https://next-auth.js.org/errors#adapter_error_getuserbyaccount write CONNECT_TIMEOUT aws-0-ap-south-1.pooler.supabase.com:5432 {
message: 'write CONNECT_TIMEOUT aws-0-ap-south-1.pooler.supabase.com:5432',
stack: 'Error: write CONNECT_TIMEOUT aws-0-ap-south-1.pooler.supabase.com:5432\n' +
' at connectTimedOut (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:181:64)\n' +
' at Timeout.done [as _onTimeout] (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:725:12)\n' +
' at listOnTimeout (node:internal/timers:566:11)\n' +
' at process.processTimers (node:internal/timers:507:7)',
name: 'Error'
}
[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error write CONNECT_TIMEOUT aws-0-ap-south-1.pooler.supabase.com:5432 Error: write CONNECT_TIMEOUT aws-0-ap-south-1.pooler.supabase.com:5432
at connectTimedOut (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:181:64)
at Timeout.done [as _onTimeout] (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:725:12)
at listOnTimeout (node:internal/timers:566:11)
at process.processTimers (node:internal/timers:507:7) {
name: 'GetUserByAccountError',
code: 'CONNECT_TIMEOUT'
}
[next-auth][error][adapter_error_getUserByAccount]
https://next-auth.js.org/errors#adapter_error_getuserbyaccount write CONNECT_TIMEOUT aws-0-ap-south-1.pooler.supabase.com:5432 {
message: 'write CONNECT_TIMEOUT aws-0-ap-south-1.pooler.supabase.com:5432',
stack: 'Error: write CONNECT_TIMEOUT aws-0-ap-south-1.pooler.supabase.com:5432\n' +
' at connectTimedOut (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:181:64)\n' +
' at Timeout.done [as _onTimeout] (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:725:12)\n' +
' at listOnTimeout (node:internal/timers:566:11)\n' +
' at process.processTimers (node:internal/timers:507:7)',
name: 'Error'
}
[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error write CONNECT_TIMEOUT aws-0-ap-south-1.pooler.supabase.com:5432 Error: write CONNECT_TIMEOUT aws-0-ap-south-1.pooler.supabase.com:5432
at connectTimedOut (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:181:64)
at Timeout.done [as _onTimeout] (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:725:12)
at listOnTimeout (node:internal/timers:566:11)
at process.processTimers (node:internal/timers:507:7) {
name: 'GetUserByAccountError',
code: 'CONNECT_TIMEOUT'
}
8 Replies
Slavi
Slavi11mo ago
You can make a function specified in the next.js docs for updating the session
aditya
adityaOP11mo ago
Refresh token rotation | Auth.js
Refresh token rotation is the practice of updating an accesstoken on behalf of the user, without requiring interaction (eg.: re-sign in). accesstokens are usually issued for a limited time. After they expire, the service verifying them will ignore the value. Instead of asking the user to sign in again to obtain a new accesstoken, certain provide...
aditya
adityaOP11mo ago
is there some way for refreshing discord token
Slavi
Slavi11mo ago
I am not sure about that
aditya
adityaOP11mo ago
okay thanks for helping!
Slavi
Slavi11mo ago
Np By the way, do you want to collaborate in some projects? @aditya
aditya
adityaOP11mo ago
sure why not
Slavi
Slavi11mo ago
Ok I will dm you
Want results from more Discord servers?
Add your server