After deploying website on versel, the verification link is not going.
Verification link has not been sended AppwriteException: Invalid url param: URL host must be one of: localhost, cloud.appwrite.io, *.vercel.app
at pR.<anonymous> (https://persona-blog-kohl.vercel.app/assets/index-4ca92157.js:109:168409)
at Generator.next (<anonymous>)
at l (https://persona-blog-kohl.vercel.app/assets/index-4ca92157.js:109:162164)
I have added the platform in appwrite, even changed the url link for email verification.
// const url = "http://localhost:5173/all-posts"
const url = "*.vercel.app/all-posts"
return await this.account.createVerification(url).then((response) => {
toast.info("Verification link has been send to your email, please verify your account by clicking on it!",{
position: toast.POSITION.TOP_RIGHT
})
console.log("Verification link has been sended to your email, please verify your account ",response);
})
.catch((error) => {
console.log("Verification link has not been sended ",error);
toast.error("Failed to send verification link. ")
})
}
async confirmEmailVerification({ userId, secret }){
return await this.account.updateVerification( userId, secret ).then((response) => {
console.log("Account verified successfully");
})
.catch((error) => {
console.log("Error occurred during email verification: ", error)
})
}```
// const url = 'http://localhost:5173/recovery'
const url = '*.vercel.app/recovery'
return await this.account.createRecovery(email, url)
.then((response) => {
toast.success("Password recovery link has been sended to your mail, please check it! ",{
position: toast.POSITION.TOP_RIGHT
})
console.log("Recovery link has been sended to your mail check it, ",response)
})
.catch((error) => {
toast.error("Error in sending recovery link", {
position: toast.POSITION.TOP_RIGHT
})
console.log("Error in sending link ",error)
})
}
async confirmPasswordRecovery({ userId, secret, new_password, confirm_password }){
return await this.account.updateRecovery( userId, secret, new_password, confirm_password)
.then((response) => {
toast.success("Password has been updated successfully. Try login again", {
position: toast.POSITION.TOP_RIGHT
});
})
.catch((error) => {
console.log("Error in password confirmation ",error);
toast.error("Error in password confirmation", {
position: toast.POSITION.TOP_RIGHT
})
})
}```
I don't think wildcard for platform works. Try adding a web platform that matches exact hostname
I have added a web platform for *vercel in appwrite console.
I don't think wildcard for platform works. Try adding a web platform that matches exact hostname
only vercel.app?
bz it don't accept the path.
No the full hostname/domain
its showing cors error now
That is not the full hostname/domain ..
by going on url its showing 404 but i have page in all-posts
Is your code deployed to that url?
Its working now.
Is there no function to delete the account of user. this.account.delete()
its not the function to delete the user account?
You would use https://appwrite.io/docs/references/cloud/client-web/account#updateStatus. Then, you need something to delete the user and anything else that may be necessary (their documents)
By updateStatus userAccount is block, then the that user cannot make an account by using those details. As in this document, using user API https://appwrite.io/docs/references/cloud/server-nodejs/users user can be deleted by appwrite doesn't provide Users as an exports.
Sorry I don't understand
As you said to use updateStatus, but updateStatus block the user, it didn't delete the user account.
In documentation its given we can delete the user account using user API.
but user API are for node.js not for web.
Yes, correct, because you need to handle the delete server side making sure to delete whatever else that's needed
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here π I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...