Anonymous user account getting deleted on calling /get-session

Basically Anonymous user accounts are getting deleted after calling /get-session 2 or 3 times (have to set disableDeleteAnonymousUser to true for it to not delete). Also onLinkAccount is getting triggered when no account linking have taken place (only api call is /get-session) My auth config
anonymous({
emailDomainName: "example.com",
onLinkAccount: async ({ anonymousUser, newUser }) => {
console.log("anonymousUser", anonymousUser);
console.log("newUser", newUser);
// perform actions like moving the cart items from anonymous user to the new user
},
}),

session: {
expiresIn: 60 * 60 * 24 * 30,
updateAge: 0,
cookieCache: {
enabled: false,
},
},
anonymous({
emailDomainName: "example.com",
onLinkAccount: async ({ anonymousUser, newUser }) => {
console.log("anonymousUser", anonymousUser);
console.log("newUser", newUser);
// perform actions like moving the cart items from anonymous user to the new user
},
}),

session: {
expiresIn: 60 * 60 * 24 * 30,
updateAge: 0,
cookieCache: {
enabled: false,
},
},
2 Replies
mihaaai
mihaaai3mo ago
Is the /get-session you're referring to the client or the server method?
Kabeer
KabeerOP3mo ago
im using const { data } = authClient.useSession(); which calls server endpoint OK. User Getting deleted has been fixed in v1.1.11 but account linking might have some problem. Need to test more Yap works ❤️ 👍

Did you find this page helpful?