Commit c830637
authored
Fixed logic for archiving users (#42)
- In the callback function, we check if the email is associated with a archived user, if they are, we don't give them a cookie. Stopping the auth process. We also have an additional check in the /auth/me that removes the cookie if they have a cookie associated with an archived user. This handles the case when the user is already logged in, we archive them, they refresh, they should no longer be authenticated I think.
- Updated the frontend so that it indicates when a user's account is archived. I know this doesn't really follow best security standards since you're supposed to say "not found", but I think in this case, it's probably good to tell users that things are archived.1 parent 07fd925 commit c830637
2 files changed
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
69 | 81 | | |
70 | 82 | | |
71 | 83 | | |
| |||
158 | 170 | | |
159 | 171 | | |
160 | 172 | | |
| 173 | + | |
161 | 174 | | |
162 | 175 | | |
163 | | - | |
| 176 | + | |
164 | 177 | | |
165 | 178 | | |
166 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
52 | 64 | | |
53 | 65 | | |
54 | 66 | | |
| |||
0 commit comments