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

disallow blocked users from the system #358

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Oct 22, 2021

Right now blocked users can access the system (they can log in, connect to socket, etc.). This PRs removes that ability.

Scenario 1, user is blocked while online

  1. Accounts.block_user/1 is called that blocks the user and removes all session tokens
  2. At the call site of Accounts.block_user/1, session tokens are iterated and for each connected socket disconnect command is sent
  3. Blocked user disconnects from backend, iOS tries to reconnect, gets 403 in response, and proceeds to log out like in test4
  4. On sign-in-with-apple screen user tries to log in, gets 403 response again, this time meaning that their account is no longer active and iOS shows a banner with support contacts

Scenario 2, user is blocked while offline

  1. Accounts.block_user/1 is called that blocks the user and removes all session tokens
  2. When connecting to the socket some time later, ios gets 403 response for the provided token, proceeds to log out
  3. same as 4. in scenario 1

@akhrail1996 akhrail1996 changed the title disallow blokced users from the system disallow blocked users from the system Oct 23, 2021
@ruslandoga ruslandoga force-pushed the master branch 2 times, most recently from 69c3989 to d59feeb Compare March 12, 2022 14:32
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

Successfully merging this pull request may close these issues.

1 participant