Verifications are created multiple times
I'm using google oauth2 in my elysia app, when I complete the oauth2 flow, I saw there is one more verification record not being consumed, so I tried multiple times, I found that oauth2 url is being created two times, sometimes oauth2 url is created one time but the console show the error
scenrio 1: verifications being created two times
{
url: "https://accounts.google.com/o/oauth2/auth?...",
redirect: true,
}
{
url: "https://accounts.google.com/o/oauth2/auth?...",
redirect: true,
}
scenrio 2: verifications being created one time but showing error
{
url: "https://accounts.google.com/o/oauth2/auth?...",
redirect: true,
}
2025-06-05T02:48:02.719Z ERROR [Better Auth]: Error 4816 | continue;
4817 | }
4818 | if (endpoint.options?.metadata?.SERVER_ONLY) continue;
4819 | const methods = Array.isArray(endpoint.options?.method) ? endpoint.options.method : [endpoint.options?.method];
4820 | for (const method of methods) {
4821 | addRoute(router, method, endpoint.path, endpoint);
^
error: NOT_FOUND
at <anonymous> (/Users/scalebear/projects/elysia-better-auth/node_modules/better-call/dist/index.js:4821:24)
at processRequest (/Users/scalebear/projects/elysia-better-auth/node_modules/better-call/dist/index.js:4818:50)
at <anonymous> (/Users/scalebear/projects/elysia-better-auth/node_modules/better-call/dist/index.js:4887:8)
1 Reply
my code:
I not sure whether the duplicated verifcations being security issue, if the verification token leaks, the account will get hijacked?