mrcentigrade
mrcentigrade
XXata
Created by mrcentigrade on 2/12/2025 in #help
@auth/xata-adapter issue.
i've a sveltekit app (svelte 4) and i am using authjs (nextauth) to implement google signin. signout / signout works. however i've noticed that updateSession doesn't work. i spent some time and bumped my authjs related packages to the latest i.e. @auth/core@latest @auth/sveltekit@latest @auth/xata-adapter@latest. my session config is as follows:
session: {
strategy: 'database',
// Session will be valid for 24 hours
maxAge: 30 * 24 * 60 * 60, // 30 days in seconds
// Update session every 4 hours if user is active
updateAge: 24 * 60 * 60, // 24 hours in seconds
// Generate new session ID on every update
generateSessionToken: () => crypto.randomUUID()
},
session: {
strategy: 'database',
// Session will be valid for 24 hours
maxAge: 30 * 24 * 60 * 60, // 30 days in seconds
// Update session every 4 hours if user is active
updateAge: 24 * 60 * 60, // 24 hours in seconds
// Generate new session ID on every update
generateSessionToken: () => crypto.randomUUID()
},
when i console log the nextauth_session record i get the following output:
{
// ...
"xata_createdat": null,
"xata_id": null,
"xata_updatedat": null,
"xata_version": null,
"xata": {
"createdAt": "2025-01-22T07:33:36.971Z",
"updatedAt": "2025-01-22T07:33:36.971Z",
"version": 0
}
}
{
// ...
"xata_createdat": null,
"xata_id": null,
"xata_updatedat": null,
"xata_version": null,
"xata": {
"createdAt": "2025-01-22T07:33:36.971Z",
"updatedAt": "2025-01-22T07:33:36.971Z",
"version": 0
}
}
the adapter is looking for the flat xata_* fields, but they're nested in the xata object. so i have to manually clear my cookies and signin again. is there any way to get around this?
4 replies
XXata
Created by mrcentigrade on 11/11/2024 in #help
summarize pagination
i'm using summarize to get unique values for a text column from my table. i've pageSize set to 10. with getPaginated i use the meta in the object returned to implement cursor based pagination. with summarize i don't have the meta in the object returned. how can i go about implementing pagination with summarize?
10 replies
XXata
Created by mrcentigrade on 11/2/2024 in #help
is branch-ing ready for production use.
was trying to figure out migration workflow in production. i just noticed that docs says the feature is in beta https://xata.io/docs/getting-started/workflow i haven't yet connected my sveltekit project github repo to xata. i just got few active users and i don't want to lose their data. i still have one branch main in my sveltekit repo but with active users now i will have to created a dev. wanted to understand how best to manage data model updates. any guidance here will be helpful. thanks in advance.
3 replies
XXata
Created by mrcentigrade on 8/12/2024 in #help
bool type is missing in web-ui dropdown
No description
6 replies