Description
The frontend sends a public API key as a custom header on every request. The backend's protected endpoints (account creation, account lookup, webhook management) don't check for this header at all - they require a properly signed bearer token that gets independently verified. There is currently no mechanism anywhere in the frontend for obtaining or refreshing such a token, and no mechanism on the backend for turning an API key into one.
Why this matters
As it stands, every request to a protected backend endpoint would be rejected as unauthenticated, regardless of whether the URL and payload are otherwise correct. This is an architectural gap, not a typo - it needs a decision about how the frontend is meant to authenticate (e.g., an issued session token, a backend-for-frontend exchange step, or something else) before it can be implemented.
Acceptance criteria
Description
The frontend sends a public API key as a custom header on every request. The backend's protected endpoints (account creation, account lookup, webhook management) don't check for this header at all - they require a properly signed bearer token that gets independently verified. There is currently no mechanism anywhere in the frontend for obtaining or refreshing such a token, and no mechanism on the backend for turning an API key into one.
Why this matters
As it stands, every request to a protected backend endpoint would be rejected as unauthenticated, regardless of whether the URL and payload are otherwise correct. This is an architectural gap, not a typo - it needs a decision about how the frontend is meant to authenticate (e.g., an issued session token, a backend-for-frontend exchange step, or something else) before it can be implemented.
Acceptance criteria