Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access stored sessions of my users? #719

Closed
rudrabhikadiya3 opened this issue Mar 21, 2024 Discussed in #699 · 1 comment
Closed

How to access stored sessions of my users? #719

rudrabhikadiya3 opened this issue Mar 21, 2024 Discussed in #699 · 1 comment

Comments

@rudrabhikadiya3
Copy link

Discussed in #699

Originally posted by rudrabhikadiya3 January 30, 2024
I am using this in Nextjs page router. In order to access my user's sessions I have to see the stored session in server so I can access it.

In case, if the user is doing bad activity in my web app so I can delete his session so he will automatically logout and I will block him through the database then he retry to login then his status will be blocked.

@vvo
Copy link
Owner

vvo commented Jun 14, 2024

To achieve what you want ("Block user from logging in") then you need to:

  • whenever your user is doing an API action on your website, check in your database if they have the rights to do so
  • if they are blocked, refuse the request
  • on login, make sure you check this field too
  • in your admin interface, make it so you can block people
    done!

@vvo vvo closed this as completed Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants