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
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...
- Collections list not showing up when try...
I'm trying to create new relationship attribute but both one way and two way relationship is not showing up collections list to connect with my relationship att...
- I have try to use the appwrite in to the...
Invalid Origin. Register your new client (oailedjdbkhlkakmnnapoonllbnfmfij) as a new Web (Chrome Extension) platform on your project console dashboard