Back

Email Verification Server API is not available

  • 0
  • Self Hosted
  • Accounts
  • Web
  • Users
Elie Waked
9 Sep, 2023, 06:09

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...

TL;DR
The user is experiencing difficulties with the Email Verification Server API. They suggest implementing restrictions based on verification status instead of disallowing session creation. They also recommend having an option to specify if verification is required during account creation. The user suggests logging in the user from the client-side and creating a JWT for email verification from a cloud function. They mention that creating a session from the server-side is not possible due to a cookies header issue. The user is requesting help with creating email verification using a Function/event and sending it to the registered user's email. The solution is to log the user in from the client-side, create a JWT for server
safwan
9 Sep, 2023, 06:44
  • 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.
Elie Waked
9 Sep, 2023, 06:53

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

Elie Waked
9 Sep, 2023, 13:34

can not be done due to cookies header being lost............

safwan
9 Sep, 2023, 13:45

You cannot create a session from the server-side

safwan
9 Sep, 2023, 13:46

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

Drake
9 Sep, 2023, 17:22

you might want to πŸ‘πŸΌ this issue: https://github.com/appwrite/appwrite/issues/3891

Drake
9 Sep, 2023, 17:23

for now, i recommend doing all this stuff client side

Elie Waked
9 Sep, 2023, 17:28

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

Elie Waked
9 Sep, 2023, 17:29

I beleive the create session should have the option to reject the authentication if account is not verified

Elie Waked
9 Sep, 2023, 17:30

and on account create an option where we can specify if the verification is required

Drake
9 Sep, 2023, 17:30

the way we do in appwrite is to restrict access to resources based on verification status rather than not allowing creating a session

Elie Waked
9 Sep, 2023, 17:30

i hope this will be included in the future

Elie Waked
9 Sep, 2023, 17:30

i understand that

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more