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
- [SOLVED] Get Relations when using Tables...
Hi there, I have a table containing a relation column with a one-to-many relationship to another table. When Using TablesDB.GetRow in "node-appwrite" i get all ...
- Transaction and Session
I've been debugging for hours a problem that now I think it's because It's not allowed: In my project a user log in using the `node-appwrite` SDK (SSR) I store...
- Appwrite loading issue with Nuxt UI
For some reason when I add nuxt ui to my nuxt 4 project, appwrite will build the project but the project website will load indefinitely. Without adding Nuxt UI,...