I'm working on a scenario - a user registers and is sent a verification email. This user ignores the email for a while and then clicks on the link after it expires.
At this point I only have the userId, the secret, and the expire query params. I want to display to the user that the link has expired but then also allow them to send a new link by a click of a button or something. But sending another verification email requires that the user has an active session but at this point I no longer have the email and the password they used to register, I basically only have the userId.
I couldn't find anything on the docs - account.get() doesn't seem to accept any parameters. And I also couldn't find a function to call where I simply pass the userId and I'll get the account info.
What's the proper flow for expired verification emails?
It's server side
But you can make a Appwrite Function that uses this and then execute it on the client side
Thank you - I think I read somewhere that accounts aren't the same as users. If I use this and get the user from the userId, will I be able to create an email session for this user and then send another verification email?
Yeah I don't see why not.
You get whole user object back in a payload https://appwrite.io/docs/models/user and you can use it for whatever.
You can do stuff with it on the client side, you can do stuff with it in the appwrite function, you can pass it to another appwrite function if needed
Just note that function is server side, and read carefully what user object has. If there is some data that does not need to go back to the client, omit it
Like password. If you don't need password, don't send it around
Recommended threads
- Auto Updating Backend & Auth via Appwrit...
<@870607367597850624> Hey everyone 👋 I wanted to ask to ask for a friend, he’s asking if Appwrite be used in a similar way to Supabase when integrated with AI ...
- execution failed
When executing an appwrite function, I'm getting a 500 error, but I don't see it in executions. This issue appeared today. Here's the appwrite function ID: 68b4...
- User Labels use Operator.arrayInsert(‘la...
Can I use the new db operators on user labels or roles?