Using MySQL and Google OAuth causes issues because the column id_token of table accounts is too short.
See this comment.
$ next dev
- info Loaded env from /Users/marvinkaunda/Desktop/cocktailanddinner-next-app/.env
- ready started server on [::]:3000, url: http://localhost:3000
- event compiled client and server successfully in 241 ms (20 modules)
- wait compiling...
- event compiled client and server successfully in 87 ms (20 modules)
- info Loaded env from /Users/marvinkaunda/Desktop/cocktailanddinner-next-app/.env
- info Loaded env from /Users/marvinkaunda/Desktop/cocktailanddinner-next-app/.env
- wait compiling /page (client and server)...
- event compiled client and server successfully in 867 ms (645 modules)
- wait compiling...
- event compiled successfully in 107 ms (351 modules)
- wait compiling /api/auth/[...nextauth]/route (client and server)...
- event compiled client and server successfully in 545 ms (918 modules)
[next-auth][warn][NEXTAUTH_URL]
https://next-auth.js.org/warnings#nextauth_url
[next-auth][error][adapter_error_linkAccount]
https://next-auth.js.org/errors#adapter_error_linkaccount target: cocktailanddinner-next-app.-.primary: vttablet: rp
https://next-auth.js.org/errors#adapter_error_linkaccount target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (C
https://next-auth.js.org/errors#adapter_error_linkaccount target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token,
https://next-auth.js.org/errors#adapter_error_linkaccount target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR
https://next-auth.js.org/errors#adapter_error_linkaccount target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */,
https://next-auth.js.org/errors#adapter_error_linkaccount target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */, :vtg8 /* VARCHAR */, :vtg9 /* VARCHAR */, default)", BindVars: {REDACTED} {
message: `target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data to
message: `target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert i
message: `target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, i
message: `target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */,
message: `target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */, :vtg8 /* VARCHAR */, :vtg9 /* VARCHAR */, defa
message: `target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */, :vtg8 /* VARCHAR */, :vtg9 /* VARCHAR */, default)", BindVars: {REDACTED}`,
stack: `DatabaseError: target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument d
stack: `DatabaseError: target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): S
stack: `DatabaseError: target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_t
stack: `DatabaseError: target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /*
stack: `DatabaseError: target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */, :vtg8 /* VARCHAR */, :vtg9 /* VAR
stack: `DatabaseError: target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */, :vtg8 /* VARCHAR */, :vtg9 /* VARCHAR */, default)", BindVars: {REDACTED}\n` +
' at Connection.execute (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_mod
' at Connection.execute (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@planetscale/database/dist/index.js:108:19)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
' at async linkAccount (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modul
' at async linkAccount (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@auth/drizzle-adapter/lib/mysql.js:142:13)',
name: 'DatabaseError'
}
[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error target: cocktailanddinner-next-app.-.primary: vttablet:
https://next-auth.js.org/errors#oauth_callback_handler_error target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001)
https://next-auth.js.org/errors#oauth_callback_handler_error target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_toke
https://next-auth.js.org/errors#oauth_callback_handler_error target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCH
https://next-auth.js.org/errors#oauth_callback_handler_error target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR *
https://next-auth.js.org/errors#oauth_callback_handler_error target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */, :vtg8 /* VARCHAR */, :vtg9 /* VARCHAR */, default)", BindVars: {REDACTED} DatabaseError: target: cocktailanddinne
https://next-auth.js.org/errors#oauth_callback_handler_error target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */, :vtg8 /* VARCHAR */, :vtg9 /* VARCHAR */, default)", BindVars: {REDACTED} DatabaseError: target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row
https://next-auth.js.org/errors#oauth_callback_handler_error target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */, :vtg8 /* VARCHAR */, :vtg9 /* VARCHAR */, default)", BindVars: {REDACTED} DatabaseError: target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider,
https://next-auth.js.org/errors#oauth_callback_handler_error target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */, :vtg8 /* VARCHAR */, :vtg9 /* VARCHAR */, default)", BindVars: {REDACTED} DatabaseError: target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg
https://next-auth.js.org/errors#oauth_callback_handler_error target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */, :vtg8 /* VARCHAR */, :vtg9 /* VARCHAR */, default)", BindVars: {REDACTED} DatabaseError: target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6
https://next-auth.js.org/errors#oauth_callback_handler_error target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */, :vtg8 /* VARCHAR */, :vtg9 /* VARCHAR */, default)", BindVars: {REDACTED} DatabaseError: target: cocktailanddinner-next-app.-.primary: vttablet: rpc error: code = InvalidArgument desc = Data too long for column 'id_token' at row 1 (errno 1406) (sqlstate 22001) (CallerID: lbc4zarfslylp19daqo0): Sql: "insert into account(userId, type, provider, providerAccountId, refresh_token, access_token, expires_at, token_type, scope, id_token, session_state) values (:vtg1 /* VARCHAR */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* VARCHAR */, default, :vtg5 /* VARCHAR */, :vtg6 /* INT64 */, :vtg7 /* VARCHAR */, :vtg8 /* VARCHAR */, :vtg9 /* VARCHAR */, default)", BindVars: {REDACTED}
at Connection.execute (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/
at Connection.execute (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@planetscale/database/dist/index.js:108:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async linkAccount (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@a
at async linkAccount (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@auth/drizzle-adapter/lib/mysql.js:142:13) {
name: 'LinkAccountError',
code: undefined
}