Web Developer
Hi! Im attempting to get the users session using serversideprops to speed up the page load, how do i get the session using the req and res/serversideprops in Next.js?
Votes
0
Replies
6
Participants
Unknown
Messages
7
Web Developer
Hi! Im attempting to get the users session using serversideprops to speed up the page load, how do i get the session using the req and res/serversideprops in Next.js?
You can see a good example of Appwrite auth with nextjs in Meldiron project Almost SSR
https://next-js.ssr.almostapps.eu/
https://github.com/Meldiron/appwrite-ssr-next-js
Web Developer
I've looked at this code but it seems to be for anonymous login only, as the anonymous session is created server-side. How can i do this for oauth?
Yes in this type of login it can be a bit tricky, check Meldiron advice here. https://discord.com/channels/564160730845151244/564160731327758347/1110645396620988436
Web Developer
and are there any plans to make this process easier in the near future?
I think. but not in the very near future.
You can see this feature request is related to the core logic of the issue, you can upvote this.
https://github.com/appwrite/appwrite/issues/3891
Because as of now there is no way to execute Client SDK actions with a Server side SDK.