Back
Invalid token passed in the request by updateVerification even though verification works
- 1
- Auth
cr4zy_fish08
Does someone know why appwrite throws this error even though the verification is updated in the console? I am using nuxt3.
Here is my code in my /server/api/verify
endpoint:
TypeScript
import { Account, Client } from "node-appwrite";
export default defineEventHandler(async (event) => {
const query = getQuery(event);
const config = useRuntimeConfig();
const client = new Client().setProject(config.public.appwriteProjectId);
const account = new Account(client);
try {
await account.updateVerification(query.userId, query.secret);
return true;
} catch (e) {
console.log("Catch");
console.error(e);
}
});
TL;DR
Issue: Appwrite is throwing an "Invalid token" error despite successful verification updating in the console for developers using Nuxt3.
Solution: The code snippet provided is using `account.updateVerification(query.userId, query.secret)` in the `/server/api/verify` endpoint, which may be causing the error. Developers should check the validity of `query.userId` and `query.secret` being passed as parameters for the verification update. Recommended threads
- The current user is not authorized to pe...
I want to create a document associated with user after log in with OAuth. The user were logged in, but Appwrite said user is unauthorized. User is logged in wi...
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...
- Rate Limit of project
AppwriteException: Rate limit for the current endpoint has been exceeded. Please try again after some time. So , how much time I have to wait and why does it h...