I need using Function/event(@userCreate) send an email verification to the registered user's email. the only way is to allow the user to login and push his email verification from the client side using JS-sdk.
Please advise if there is any work around i missed in the documentation...
- You will have to log the user in from the client-side
- Once that's done, you can create a JWT to authenticate on the server-side and perform actions on behalf of the user. Docs for JWT
- You can then call the Create Email Verification with the JWT that was generated to start the email verification flow.
thanks for your response I think i wil let the function Create User 1- create the user 2- login with the user credentials 3- request validation I need the websdk and the node sdk at the same time installled I will test it
can not be done due to cookies header being lost............
You cannot create a session from the server-side
You need to login the user from the client-side, and then create a JWT. Then use this JWT to create email verification from the cloud function
you might want to 👍🏼 this issue: https://github.com/appwrite/appwrite/issues/3891
for now, i recommend doing all this stuff client side
thanks a lot! in fact as admin server side access i am expecting to be able everything in the client side plus more admin features
I beleive the create session should have the option to reject the authentication if account is not verified
and on account create an option where we can specify if the verification is required
the way we do in appwrite is to restrict access to resources based on verification status rather than not allowing creating a session
i hope this will be included in the future
i understand that
Recommended threads
- Self-host migration from 1.8.X
Is it safe to now migrate from 1.7.4 to 1.8.X on my selfhost?
- DeploymentStatus enum value `canceled` m...
Hey, Sorry if it has been reported already, I found an issue using the Dart SDK where the `canceled` enum value is missing from `DeploymentStatus`. This causes...
- Problem with Google Workspace at DNS Rec...
Hello, I bought a domain at Namecheap, and Google Workspace used to work there, but now that I switched from Custom DNS to Appwrite's nameservers, it doesn't w...