backend جدید clinicpro جریان سهمرحلهای دارد:
send-code → verify-code (uuid+code) → oauth/token (uuid).
- token route حالا اول /api/v1/user/verify-code را صدا میزند سپس
/oauth/token با بدنه JSON {grant_type, uuid} (بهجای form-urlencoded
با client_id/secret/scope که فقط backend پروداکشن قدیم میپذیرفت)
- refresh route به مسیر درست /oauth/token/refresh با بدنه JSON
- تست E2E روی ddev محلی: access_token واقعی صادر شد
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
route های token و refresh از fetch بومی Node استفاده میکردند که گواهی
self-signed ddev محلی را رد میکرد و خطای 500 میداد. حالا از axiosInstance
استفاده میکنند و خطای واقعی backend را با status درست برمیگردانند.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Fix GPS map links always sending literal "latitude"/"longitude" strings
instead of actual coordinates in openLocation/Content.js
- Add api.clinic-pro.ir to next.config.js remotePatterns so production
images load correctly
- Fix appointment page: await params and getStateInfo (Next.js 15 pattern)
- Enable 401 handling in api.js: clear cookies and redirect to /login
- Move OAuth client_secret to server-side API routes (/api/auth/token,
/api/auth/refresh) so it is never bundled into client-side JavaScript
- Update SendReq, SubmitData, ButtonSendData to call API routes instead
of directly sending client_secret from the browser
- Update docker-compose.yml to use server-only CLIENT_SECRET env var
- Remove debug console.log from clinic doctors list component
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>