Commit 9dd57ff
committed
fix(client): verify email via Payload Local API to bypass basic auth
The verify-email server action was calling the Payload REST SDK against
NEXT_PUBLIC_URL, so the request looped back through Next.js middleware.
Local dev (and any env without auth creds in the public URL) hits the
BASIC_AUTH gate and gets a 401 "Authentication required" before reaching
Payload, leaving the user on the verification error page.
Switch to the Payload Local API (getPayload + payload.verifyEmail). No
HTTP roundtrip, no middleware, works in every env regardless of how
basic auth is wired.1 parent 5a25176 commit 9dd57ff
1 file changed
Lines changed: 7 additions & 6 deletions
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
0 commit comments