tigawana
tigawana
Explore posts from servers
BABetter Auth
Created by tigawana on 4/12/2025 in #help
cross-site cookie in express
funally figured it out
advanced: {
crossSubDomainCookies: {
enabled: true,
// domain: process.env.COOKIE_DOMAIN || undefined,
},
cookie: {
sameSite: "none",
secure: true,
// domain: process.env.COOKIE_DOMAIN || undefined,
path: "/",
},
defaultCookieAttributes: {
secure: true,
// httpOnly: true,
sameSite: "none", // Allows CORS-based cookie sharing across subdomains
// partitioned: true, // New browser standards will mandate this for foreign cookies
},
},
advanced: {
crossSubDomainCookies: {
enabled: true,
// domain: process.env.COOKIE_DOMAIN || undefined,
},
cookie: {
sameSite: "none",
secure: true,
// domain: process.env.COOKIE_DOMAIN || undefined,
path: "/",
},
defaultCookieAttributes: {
secure: true,
// httpOnly: true,
sameSite: "none", // Allows CORS-based cookie sharing across subdomains
// partitioned: true, // New browser standards will mandate this for foreign cookies
},
},
ignore the domain attribute and it'll work for cross domains (it might expose you to CSRF though am not sure)
3 replies
BABetter Auth
Created by tigawana on 4/12/2025 in #help
cross-site cookie in express
And from the looks of things even setting it to false gets overwritten somehow
3 replies
BABetter Auth
Created by tigawana on 4/12/2025 in #help
oauth redirect to homepage on another domain
Many thanks it worked
3 replies
BABetter Auth
Created by tigawana on 2/5/2025 in #help
How do i get the oauth token and save it to the additional fields
Ohh i see it in the accounts table, yes it would be convenient to have it in the user session payload
3 replies
DDeno
Created by tigawana on 1/2/2024 in #help
deno deploy queues
this too isn.t working , only locally , am i doing it wrong?
4 replies
DDeno
Created by tigawana on 1/2/2024 in #help
deno deploy queues
ohh, something like this ?
const db = await Deno.openKv();
db.listenQueue(async (msg) => {
const data = msg as { channel: string; text: string };
console.log("=== QUEUE MESSAGE === ", data);
await db.set(["test-queues", data.channel], data.text);
console.log("saved to kv ==== ",await db.get(["test-queues", data.channel]));
});

app.get('/test', async(c) => {
try {
const env = await load();
// const db = await Deno.openKv();

// db.listenQueue(async(msg) => {
// const data = msg as { channel: string; text: string };
// console.log("=== QUEUE MESSAGE === ",data);
// await db.set(["test-queues", data.channel], data.text);
// });

await db.enqueue({ channel: "C123456", text: "Slack message" }, {
delay: 0,
});
return c.json({
env,
})
} catch (error) {
return c.text("error with queues === "+error.message, 401);
}
})
const db = await Deno.openKv();
db.listenQueue(async (msg) => {
const data = msg as { channel: string; text: string };
console.log("=== QUEUE MESSAGE === ", data);
await db.set(["test-queues", data.channel], data.text);
console.log("saved to kv ==== ",await db.get(["test-queues", data.channel]));
});

app.get('/test', async(c) => {
try {
const env = await load();
// const db = await Deno.openKv();

// db.listenQueue(async(msg) => {
// const data = msg as { channel: string; text: string };
// console.log("=== QUEUE MESSAGE === ",data);
// await db.set(["test-queues", data.channel], data.text);
// });

await db.enqueue({ channel: "C123456", text: "Slack message" }, {
delay: 0,
});
return c.json({
env,
})
} catch (error) {
return c.text("error with queues === "+error.message, 401);
}
})
4 replies
DDeno
Created by tigawana on 12/27/2023 in #help
Remote KV access error : Missing DENO_KV_ACCESS_TOKEN environment variable
no , am not pssing in --env
6 replies
DDeno
Created by tigawana on 12/27/2023 in #help
Remote KV access error : Missing DENO_KV_ACCESS_TOKEN environment variable
.env
6 replies
DDeno
Created by tigawana on 12/26/2023 in #help
List kv items using a partial key
Thank you even more
6 replies
DDeno
Created by tigawana on 12/26/2023 in #help
List kv items using a partial key
Thanks guys it worked
6 replies