saze
saze
BABetter Auth
Created by saze on 3/3/2025 in #bug-reports
Social Login state mismatch error
I migrated to v 1.2 and this broke the apple and google logins for my site. I couldn't figure out what exactly was wrong as the oauth flow wasn't completing successfully. I got this logs in my server this is the server error logs 2025-03-03T06:39:36: ^[[2m2025-03-03T06:39:36.790Z^[[0m ^[[31mERROR^[[0m ^[[1m[Better Auth]:^[[0m State Mismatch. Verification not found { stat> 2025-03-03T06:39:36: # SERVER_ERROR: TypeError: Cannot read properties of undefined (reading 'get') 2025-03-03T06:39:36: at <unknown> (.next/server/chunks/903.js:299:18339) 2025-03-03T06:39:36: at Object.r [as handler] (.next/server/chunks/903.js:84:105326) 2025-03-03T06:39:36: at async y (.next/server/chunks/903.js:84:93446) 2025-03-03T06:39:36: at async r.<computed> (.next/server/chunks/903.js:84:95322) 2025-03-03T06:39:36: at async n (.next/server/chunks/903.js:113:3325) 2025-03-03T06:39:36: at async handler (.next/server/chunks/903.js:113:3609) 2025-03-03T06:40:46: # SERVER_ERROR: TypeError: Cannot read properties of undefined (reading 'get') 2025-03-03T06:40:46: at <unknown> (.next/server/chunks/903.js:299:18339) 2025-03-03T06:40:46: at Object.r [as handler] (.next/server/chunks/903.js:84:105326) 2025-03-03T06:40:46: at async y (.next/server/chunks/903.js:84:93446) 2025-03-03T06:40:46: at async r.<computed> (.next/server/chunks/903.js:84:95322) 2025-03-03T06:40:46: at async n (.next/server/chunks/903.js:113:3325) 2025-03-03T06:40:46: at async handler (.next/server/chunks/903.js:113:3609). Reverting back to 1.1.21 fixed it and my oauth flow started working correctly again. Obviously, I need to upgrade so what is the cause of this and how can i fix it?
6 replies
BABetter Auth
Created by saze on 2/25/2025 in #bug-reports
getSession returning null in dev mode
I am suddenly unable to login to my app when running it in dev mode as getSession returns null. This issue does not occur in production. And it is a new behavior, although I can't pinpoint what is leading to it. Below is my network calls. //network calls //headers Request URL: http://localhost:3000/api/auth/sign-in/email-otp Request Method: POST Status Code: 200 OK Remote Address: [::1]:3000 Referrer Policy: strict-origin-when-cross-origin access-control-allow-credentials: true access-control-allow-headers: Content-Type, Authorization, X-CSRF-Token, Cookie access-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS access-control-allow-origin: http://localhost:3000 access-control-max-age: 86400 connection: keep-alive content-type: application/json date: Tue, 25 Feb 2025 16:33:07 GMT keep-alive: timeout=5 transfer-encoding: chunked vary: content-type: application/json dnt: 1 referer: http://localhost:3000/login?callbackUrl=%2Fdashboard sec-ch-ua-platform: "macOS" user-agent: Mozilla/5.0 //payload {email: "", otp: "895795"} email : "" otp : "895795" //response { "token": "kIaU2uQUwu2fxDNxoRD0LQqzHWB3wXYg", "user": { "id": "cm7jhbf150004jx6xaqag930u", "email": "**", "emailVerified": true, "name": "**", "image": null, "createdAt": "2025-02-24T19:57:09.978Z", "updatedAt": "2025-02-24T19:57:37.868Z" } } //headers Request URL: http://localhost:3000/api/auth/get-session Request Method: GET Status Code: 200 OK Remote Address: [::1]:3000 Referrer Policy: strict-origin-when-cross-origin connection: keep-alive content-type: application/json date: Tue, 25 Feb 2025 16:33:07 GMT keep-alive: timeout=5 transfer-encoding: chunked vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Router-Segment-Prefetch dnt: 1 referer: http://localhost:3000/login?callbackUrl=%2Fdashboard sec-ch-ua-platform: "macOS" user-agent: Mozilla/5.0 //response null
6 replies
BABetter Auth
Created by saze on 1/7/2025 in #help
How do you register a user with the email otp plugin
Name is required in the database, so how do you pass name to the email otp plugin to create a new user(if they have not being registered before)
1 replies