From 7582a9c255c4983a245b1954999924f2c1ad8690 Mon Sep 17 00:00:00 2001 From: pulipakaa24 Date: Fri, 10 Apr 2026 01:14:42 -0500 Subject: [PATCH] apple signin should work now hopefully --- server/src/auth/auth.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/src/auth/auth.ts b/server/src/auth/auth.ts index ceed746..cfc37ed 100644 --- a/server/src/auth/auth.ts +++ b/server/src/auth/auth.ts @@ -166,6 +166,9 @@ export const auth = betterAuth({ trustedOrigins: [ 'http://localhost:5173', 'https://labwise.wahwa.com', + // Apple sends the OAuth code via form_post, so the POST to + // /api/auth/callback/apple arrives with Origin: appleid.apple.com. + 'https://appleid.apple.com', // iOS native app callback — allows Better Auth to honour the // https://labwise.wahwa.com/api/ios-callback callbackURL 'labwise://',