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;
}```
Seems to be a timing issue and the load function in svelte
Recommended threads
- [SOLVED] Error upgrading from 1.8.1 to 1...
DO Self-hosted server failed to upgrade with this error "Error response from daemon: client version 1.52 is too new. Maximum supported API version is 1.42". U...
- MariaDB refuses to connect to appwrite
Earlier, I tried updating my Appwrite version from 18.1.x to the latest release because my Flutter package required it to function properly. I used the official...
- Custom API domain is unreachable
Earlier my custom api domain was working fine. Now it seems to be offline without a trace a few hours later. I didn't change anything, all the relevant DNS reco...