Back

Autenticate Users on the Server

  • 0
  • Web
Mohammed Anas
25 Dec, 2023, 07:35

How do i authenticate my users on the Server , when i use the client sdk , my users is store in the browsers localStorage , but what if i wanna Serverside render some page which should have a restricted access.

TL;DR
The user is asking how to authenticate users on the server and pass the authentication state to the client. Some suggestions were given, such as creating a session on the client side and manually handling the userID on the server. The user also mentioned using SvelteKit and asked if there is a way to authenticate users on the server and restrict access to certain pages. No solution was provided in the thread.
Mohammed Anas
25 Dec, 2023, 07:36

Add yes i can use the JWT method but what if my user is signedIn and directly access the protected page (opening the starting page).

Mohammed Anas
25 Dec, 2023, 07:37

Is there any way to authenticate users on the server and typically pass that auth state to the client

Mohammed Anas
25 Dec, 2023, 07:37

i use sveltekit btw

ideclon
25 Dec, 2023, 18:02

Not currently, no. You can upvote this issue on GitHub - https://github.com/appwrite/appwrite/issues/3891

ideclon
25 Dec, 2023, 18:03

In the meantime, you could have the session created on the client side, then pass the userID to the serverside and just handle that manually

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more