
If not, how can I verify the emails of users which would be registering using email otp?

OTP
is the secret
, so it should be fine.

If that's the case, then why am I getting these error?

can you show some relevant code?

sdk versions would be good too in the details.

`export const register = async (email, password, name) => { try { const user = await account.create("unique()", email, password, name); if (user) { // Automatically log in after registration account.createEmailToken(ID.unique(), email, true).then( function (response) { console.log("Success sending otp"); // Success return response; }, function (error) { console.log("Failure sending otp", error); // Failure } ); // const session = await account.createSession(user.$id, secret); secret is the otp return { success: true, // data: session.data, emailVerification: user.emailVerification, userId: user.$id, // Return userId for OTP verification }; } return { success: false, error: "Registration failed" }; } catch (error) { console.error("Registration error:", error); return { success: false, error: error.message }; } };
export const verifyOTP = async (userId, secret) => { console.log("userId", userId, "\nOTP: ", secret); try { const response = await account.updateVerification(userId, secret); //I think it doesn't works with the otp response.then( function (response) { console.log("Verification was successful! \n", response); // Success }, function (error) { console.log("there was some error verifying the user \n", error); // Failure } ); return { success: true, data: response }; } catch (error) { console.error("OTP verification error:", error); return { success: false, error: error.message }; } };`

idk about sdk version but I am using appwrite 14.0.1

aah I see. My bad, you should be able to directly create a session. See - https://appwrite.io/docs/products/auth/email-otp

It means there is no way to verify a user through otp login?

looking at the source, once the session is created via magic-url
or otp
, the email should be marked as verified.

ooh, if that's the case. It would be nice!
Recommended threads
- Microsoft Oauth2 gets auto disabled
I'm runnin appwrite self hosted 1.7.4 and once every few hours the provider keeps getting disabled for whatever reason. I don't see anything in the logs and wo...
- Site Git deployment bug
I am facing issue when trying to create a site and deploy it into git, see attached video: ```json { "message": "When connecting to VCS (Version Control Sy...
- `http://` callback URIs
Hiya. I'm a little inexperienced with SSL and HTTPS, so I'm not sure if what I've been trying does anything. My redirect URIs for my OAuth providers are all HT...
