「🔨」 fix: fixed cookie with google callback

This commit is contained in:
KeyZox committed 2025-10-14 18:24:22 +02:00
1 parent e826070b8f
commit d80beff543
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ export async function gLogCallback(request, reply, fastify) {
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
.setCookie('token', token, {
+1 -1
View File
@@ -49,7 +49,7 @@ export async function gRegisterCallback(request, reply, fastify) {
authUserCreate(user.username, fastify)
const token = fastify.jwt.sign(user);
const token = fastify.jwt.sign({ user: user.username});
return reply
.setCookie('token', token, {
+1 -1
View File
@@ -13,7 +13,7 @@ export async function authUserCreate(username, fastify) {
const url = process.env.USER_URL || "http://localhost:3002/"
await axios.post(
"http://localhost:3002/users/" + username,
url + "users/" + username,
payload,
{
headers: {