🔨」 fix: fixed cookie with google callback

This commit is contained in:
2025-10-14 18:24:22 +02:00
parent e826070b8f
commit d80beff543
3 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ export async function gLogCallback(request, reply, fastify) {
return reply.code(400).send({ error: "User does not exist" }); return reply.code(400).send({ error: "User does not exist" });
} }
const token = fastify.jwt.sign(user); const token = fastify.jwt.sign({ user: user.username});
return reply return reply
.setCookie('token', token, { .setCookie('token', token, {

View File

@ -49,7 +49,7 @@ export async function gRegisterCallback(request, reply, fastify) {
authUserCreate(user.username, fastify) authUserCreate(user.username, fastify)
const token = fastify.jwt.sign(user); const token = fastify.jwt.sign({ user: user.username});
return reply return reply
.setCookie('token', token, { .setCookie('token', token, {

View File

@ -13,7 +13,7 @@ export async function authUserCreate(username, fastify) {
const url = process.env.USER_URL || "http://localhost:3002/" const url = process.env.USER_URL || "http://localhost:3002/"
await axios.post( await axios.post(
"http://localhost:3002/users/" + username, url + "users/" + username,
payload, payload,
{ {
headers: { headers: {