Delete User with Token gives error

I'm trying to use:
const { data, error } = await authClient.deleteUser({
token,
callbackURL: "/",
});
const { data, error } = await authClient.deleteUser({
token,
callbackURL: "/",
});
-# (token is 100% defined as a valid string) However, my client gets the error:
"[
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"token"
],
"message": "Required"
}
]"
"[
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"token"
],
"message": "Required"
}
]"
6 Replies
bekacru
bekacru3mo ago
this is saying token is undefined
ted
tedOP3mo ago
Definitely can confirm token is valid and a string :hahaha:
bekacru
bekacru3mo ago
update to latest if you're not incase
ted
tedOP3mo ago
I’m on 1.1.1 i’ll try something later Right I just hard coded a token and got the same error...
bekacru
bekacru3mo ago
should be fixed on 1.1.2
ted
tedOP3mo ago
thanks ❤️ can confirm v1.1.2 fixes this

Did you find this page helpful?