Coding agents and scripts
Create a token in the dashboard’s API token settings. Keep it in a local environment variable. Send it only to your chosen Spring Winter origin:401; it does not fall back to the browser session.
Read the agent guide before making changes. Use https://springwinter.dev in production and the exact local origin during development. Do not follow redirects with an authorization header.
Browser sessions
Cookie authentication uses the HTTP-onlysession_id cookie. Before a cookie mutation, including login, call GET /api/csrf, retain its cookies, and send the returned csrf_token in X-CSRF-Token. A missing or invalid CSRF token returns 422 with invalid_csrf_token.
Password login uses this nested body:
201 with user and a new csrf_token. Use that token for later cookie mutations. Unverified email returns 403 with email_unverified. Incorrect credentials return 401 with invalid_credentials.
Read session and account contracts for all session, registration, email verification and password reset operations. Coding agents should use an API token rather than collecting a customer’s password.