
Hello,
I'm trying to create an Appwrite function that takes an email address as input, checks it against a list, and if there's a match, it creates a user and sends them a verification email. The process I follow is:
Create the user using users.create.
Attempt to send a verification email to the newly created user.
Everything works fine up until the point where I try to send the verification email. From my understanding, Appwrite recently introduced the users.createToken(UserId) method to allow server-side actions on users. I’ve also tried using users.createJWT(UserId) to generate a token, but I still can’t get the createVerification method to work at the end of my function.
Could someone guide me on how the correct workflow should look?
When I use the client SDK from npm (appwrite), I get a "fetch is not defined" error. When I try the node-appwrite server-side SDK, I can't get createVerification to run without a session, which I don’t have.
Any advice or tips on how to resolve this issue would be greatly appreciated.
Thanks in advance!
Recommended threads
- Is Quick Start for function creation wor...
I am trying to create a Node.js function using the Quick Start feature. It fails and tells me that it could not locate the package.json file. Isn't Quick Start ...
- Connecting server functions to GitHub re...
The project I am working in has recently moved organizations on Appwrite. The same is true for the repo on GitHub, which as moved from a private user to a organ...
- Storage & Database is not allowing.
Storage & Database is not allowing to CRUD after i have logged in ? Using web SDK with next.js without any SSR or node-sdk.
