Hi guys, want to ask why when try create session for opt I pass userId and secret but still give me : Payload example:
{ "userId": "671cdc7dc67c67739e23", "secret": "582862" }
response: { message: 'Invalid token passed in the request.', code: 401, type: 'user_invalid_token', version: '1.6.0' }
My api code in next route :
.post("/verifyOtp", async (c) => { const { userId, secret } = await c.req.json(); try { const { account } = await createAdminClient(); const res = await account.createSession(userId, secret); console.log("res", res);
} catch (error) {
console.log("error", error);
return c.json({ success: false, error: error }, 400);
}
})
Recommended threads
- MFA TOTP State Inconsistency After Disab...
MFA TOTP State Inconsistency After Disable/Re-enable Flow — Invalid Token During Verification Environment: - Next.js - node-appwrite - Session-based authentica...
- Large File Upload Issue with S3/RustFS
Hi, we are seeing a reproducible large upload failure with Appwrite 1.8.0 using S3-compatible storage through RustFS. A file upload of about 10.7 GB consistent...
- Terraform tablesdb_column type inconsist...
Hi, I am trying out the new terraform provider for appwrite that was introduced a few weeks back. As a first step I wanted to import our existing databases into...