Hello, I have an issue using updateMagicURLSession. I send the email using sendMagicLink, which works fine. When i click the link in the email i get the invalid token passed in the request. What is really weird is when i refresh the browser everything works, just not directly clicking the email. I am using Svelte with ssr and doing this server side.
Here is the code. Not sure why this is happening. because i checked everything and i do get a session when i view the cookies in the browser inspector.
I have a separate file for creating the session client:
const client = new Client()
.setEndpoint(PRIVATE_APPWRITE_ENDPOINT) // Your endpoint
.setProject(PRIVATE_APPWRITE_PROJECT)
.setKey(PRIVATE_APPWRITE_KEY); // API key for admin tasks
return client;
}
export function createSessionClient() {
const client = new Client()
.setEndpoint(PRIVATE_APPWRITE_ENDPOINT) // Same endpoint
.setProject(PRIVATE_APPWRITE_PROJECT); // No API key here
return client;
}```
Recommended threads
- Usage of the new Client() and dealing wi...
Hey guys, just a quick one - we had some web traffic the other day and it ended up bombing out - To put in perspective of how the app works, we have a Nuxt Ap...
- [Beginner] CLI --queries Syntax Error & ...
Hi everyone! I am a beginner with Appwrite and trying to use the CLI, but I'm stuck with a syntax error. Any guidance would be greatly appreciated! 🙏 **Enviro...
- [SOLVED] curl error Number: 6 — function...
Hello, I invested a lot of time in this error in a fresh install of appwrite 1.8.1 and lasted until fix, this if for helping anyone that can have the same weird...