Milan||Милан
Milan||Милан
BABetter Auth
Created by erik on 3/5/2025 in #help
Decoding auth token from non-ts environment
I think the better-auth JWT JWKS plugin might be what you need
2 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
im slowly going insane
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
unfortunately
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
No it didnt yet
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
if i fix that i suppose it works
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
the name of the cookie is auth when it should be better-auth.session_token
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
yeah i think i almost have it now
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
Error: You must specify a path when setting, deleting or serializing cookies
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
export const actions = {
default: async ({ request, cookies }: { request: Request; cookies: never }) => {
console.log(request);
const formData = await request.formData();
const password = formData.get('password') as string;
const email = formData.get('email') as string;
const response = await auth.api.signInEmail({
header: request.headers,
body: {
email,
password
},
asResponse: true
});

const cookiez = response.headers.get('set-cookie');
if (response.ok) {
cookies.set(cookiez);
}
}
};
export const actions = {
default: async ({ request, cookies }: { request: Request; cookies: never }) => {
console.log(request);
const formData = await request.formData();
const password = formData.get('password') as string;
const email = formData.get('email') as string;
const response = await auth.api.signInEmail({
header: request.headers,
body: {
email,
password
},
asResponse: true
});

const cookiez = response.headers.get('set-cookie');
if (response.ok) {
cookies.set(cookiez);
}
}
};
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
Whats that
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
Sveltekit
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
No :(
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
The cookie name "better-auth.session_token=xLGnAfcMNb4tbx61F53Tid5kFVLoCRhl.X%2Bgfyz2%2BmFCb3u25oyolHqoaA9XmH5SdkvvhhYYlYgI%3D; Max-Age=604800; Path=/; HttpOnly; SameSite=Lax" will be invalid in SvelteKit 3.0 as it contains =. See RFC 2616 for more details https://datatracker.ietf.org/doc/html/rfc2616#section-2.2 Error: You must specify a path when setting, deleting or serializing cookies
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
oh nvm fixed it
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
TypeError: Cannot read properties of undefined (reading 'get')
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
const cookiez = res.headers.get('set-cookie');
46 replies
BABetter Auth
Created by Sithu Khant on 3/2/2025 in #help
This server side code worked on `^1.1.18`, but not anymore on `^1.2.0`.
Why are you passsing the headers into the signInEmail?
46 replies