Steps to reproduce:
pnpm install- Put clerk environment variables into
.env(didn't want to commit them) - Run
pnpm dev - Open the page, create two orgs
- Start vscode debugger which will attach to the server worker
- Put a breakpoint in worker/index.ts
- Open the page in a browser, click on the button corresponding to the correct org. See console.log messages
- Open the page in a browser, click on the wrong org. See console.error messages or single-step through the call to authenticateRequest
NOTE: in the real app, there are separate tabs, one per org. But in the example, for ease of testing so you don't need two tabs open, I allow connecting to either org.