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
- TOO_MANY_REDIRECTS after temporarily ena...
I am losing my mind over this, I enabled this setting because I was having issues with sites not making links with https. I enabled it, ran into issues, so I di...
- Flutter OAuth2 does not attach Google se...
Hi Appwrite team, I’m using Appwrite Auth in a Flutter mobile app and trying to upgrade an anonymous user to Google OAuth. Docs say that if there is already a...
- TablesDB `updateRows` returns `database_...
Hi Appwrite team! I’m seeing a strange issue with TablesDB bulk row updates on a self-hosted Appwrite instance. **Environment** - Appwrite self-hosted `1.9.0` ...