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
- functions domain error
I cannot set up the domain for function I’m trying to add the domain api.example.com I can only use Cloudflare as the DNS provider because my domain provider do...
- Storage Bucket Permissions
Hey folks, when enabling CRUD on the bucket level for the role any, should the bucket be accessible when using a session client?
- Python function - error while creating /...
I have been trying to figure it out myself for the last 2 days. I have self-hosted appwrite instance, and I am running python 3.12 function. It works great up t...