Anyone have use case to implement middleware to protect dashboard & login page?
I try to implement middleware on nextjs with api to check current session, but it's not gonna work.
Server side rendering is a huge pain. I highly recommend sticking with client side code if possible
You can check this repo for SSR: https://github.com/Meldiron/appwrite-ssr-next-js
But keep in mind the cookie explanation, as you won't be able to get the appwrite cookie in your middleware if that isn't solved
Recommended threads
- Google OAuth: User Created But Session N...
## Problem Summary When signing in with Google, the user is successfully created in the Appwrite console, but the session is not being recognized on the client ...
- OAuth2 Session Not Persisting After Goog...
I'm implementing Google OAuth2 authentication in React using Appwrite SDK. The flow is: 1. User clicks "Sign in with Google" button 2. Gets redirected to Googl...
- New OAuth provider not appearing in Cons...
Hi team! I'm contributing to Appwrite and currently working on adding Hugging Face as a new OAuth provider. Here's what I've done so far: - Implemented the ...