Next.js Discord

Discord Forum

prevent users deleted from the database from accessing the web service.

Unanswered
British Shorthair posted this in #help-forum
Open in Discord
British ShorthairOP
A user is trying to access the web service. In this scenario, the user's data has been deleted from the database, but a session is still stored in their browser cookies.

Currently, the middleware only redirects users without a session to the login page.
However, if a user has a session but their data has been deleted from the database, they can still navigate anywhere within the web service.

I don't know how to resolve this.

0 Replies