DEV Community

Discussion on: Appwrite x DEV Hackathon Help Thread

Collapse
 
georgeisiguzo profile image
Georgie

Hi everyone! Please I need help.

I'm using an express API to avoid CORS issues. How can I implement session management from the server.

doing sdk.account.createsession(...) doesn't manage session across frontend pages

Thanks.

Collapse
 
gewenyu99 profile image
Vincent Ge

Hi there, if you're trying to solve CORS issues, add a relevant web platform. We block all cross domain request by default for security, but you can add as many allowed web platforms as you wish.

The Server SDK isn't really meant to be used with end user sessions, they're under an Admin scope. I would just resolve CORS issues and use a frontend SDK :D

Reference => dev.to/appwrite/30daysofappwrite-y...

Collapse
 
georgeisiguzo profile image
Georgie

Thanks. I was using Gitpod and even though I added web platforms to my project, I still get CORS issues.

I'm using digital Ocean now and its working fine

Thread Thread
 
gewenyu99 profile image
Vincent Ge

This might be something specific to the way Gitpod routes their requests... But it should work still.

Have you seen Appwrite + Gitpod in this guide? gitpod.io/guides/appwrite-and-gitpod

Thread Thread
 
asaoluelijah profile image
Asaolu Elijah 🧙‍♂️

I was having the same cors issue (with Gitpod), however, changing the host name from the default http to httpsfixed the issue for me.