Hey I am trying to follow the react tutorial and im on the first section of creating a login page everything worked fine but when logging out im being met with the cors error. I have added a platform with localhost as the name and I even tried * wildcard but the logout will not work due to cors can anyone assist please
this is what I am using
await account.deleteSession('current'); setLoggedInUser(null);
Just would love to get this sorted as I'm trying to develop ui to advertise my skills
I’m pretty sure we’ve seen this before, but I don’t remember (and I can’t find rn) if or how it was resolved
thats not a problem I appreciate the help its just strange how Ive followed the steps on your tutorial and the youtube channel to avoid cors and only the deletesessions() is not working for me
i get the user sessions but when it comes to deleting the session for loging out purpose it fails
Yeah, I’ve seen that happen specifically with deleting sessions in the past
I have tried to do variations of the delete session but unfortunately nothing I have tried testing the rest via postman but get a user role error
You won’t be able to hit the deleteSession() endpoint in Postman without having an active session there.
okay I ses so this is redundant unless I can get the active session
One odd thing is I don't see the project in the headers 🧐
What was the result of the other request that failed?
It is very strange is there a step I'm missing cause I'm following the documents step by step
Where am I suppose to put the project in the headers I can share my code
I think that might just be because that’s the preflight, not the actual request
I would still expect it to have the project header
You're supposed to call setProject()
I do have the setProject in the config file but I found another document where I will give that a try
@\geekdev You can see the Project header is present here
I've tried this doc to try a new approach but still issues when it comes to the logout
access-control-allow-methods: * which I am using as a wildcard for the platform aswell as local host so would I need to manually write that in the code to by pass this
https://appwrite.io/blog/post/handle-cors-in-serverless-functions im referencing this
issue appears to have been resolved I believe it was due to my extension
Oh yes! Now I remember - the last time this came up it was a browser extension too!
If your issue has been solved, you can mark this post as closed by adding "[SOLVED]" to the beginning of the title
Recommended threads
- Magic Link woes/noob
Magic Link is working; it sends the link to my email. But the link itself always leads to "Page Not Found. The page you're looking for doesn't exist". Clicking ...
- is `account.get()` safe to be used in th...
I want to user's `id` for authentication. However, a while ago I was told in this server not to use `account.get()` and instead add user preferences for that us...
- 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...