Commit 1408969
Fix ERR_TOO_MANY_REDIRECTS for rejected users accessing declined page
Fixed infinite redirect loop that occurred when users with rejected/failed application status tried to sign in. The middleware was performing unnecessary application status checks on the /auth/declined page itself, causing the page to redirect to itself infinitely.
Changes:
- Add AUTH_STATUS_ROUTES constant for routes that bypass application status checks
- Allow authenticated users to access /auth/declined and /auth/verify without status validation
- Remove unused error variables to fix TypeScript warnings
This prevents the redirect loop by letting users access status-specific pages (/auth/declined, /auth/verify) immediately after authentication, without triggering additional status-based redirects.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 52e0fea commit 1408969
1 file changed
Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
92 | | - | |
93 | 95 | | |
94 | 96 | | |
95 | | - | |
| 97 | + | |
96 | 98 | | |
97 | | - | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
126 | | - | |
127 | 133 | | |
128 | 134 | | |
129 | 135 | | |
| |||
0 commit comments