ZEVA2 - updating users
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 6
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 32
Description
**Description:**
- [ ] When database record that represents a user gets updated (e.g. made inactive, have their roles changed, etc.), we should also update the user's session cookie, if one exists. We can do this by forcing the user to log out and log back in whenever their database record gets updated.
**Wireframe:**
**Purpose and benefit to user:**
This will make the application more secure, preventing users who were deactivated from logging in, or preventing them from seeing resources they can't see under their updated role(s).
**Acceptance Criteria:**
- [ ] Given I am an administrator, when I update a user, I create a flag that makes it so that, upon the user's next request to the backend, if they are already authenticated, they are redirected to a page that prompts them to logout. Also, upon the user's next sign-in, this flag is removed.
**Development Checklist:**
- [ ] Create a new column in the users table that stores the aforementioned flag.
- [ ] Update the `updateUser` action so that the flag is set whenever the action is executed.
- [ ] Update auth.ts (the `jwt` and `authorized` callbacks are probably the one of interest here; also consider adding the `signIn` callback)
- [ ] Create a new page that tells them to log out.
**Notes:**
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.