feat(ui): mejoras dashboard y entorno local con ngrok/ORCID sandbox
- Añade enlace Volver al inicio y márgenes max-w-7xl en dashboard y group - Corrige hora de última sincronización (UTC en formatDate) - Evita scroll horizontal en tabla de publicaciones - Soporta backend/.env.local y compose opcional para sandbox/ngrok - Cookie OAuth Secure en redirects HTTPS; README y .env.example
This commit is contained in:
@@ -86,6 +86,7 @@ Default local URLs:
|
||||
|
||||
Backend:
|
||||
- Main file: `backend/.env`
|
||||
- Optional local overrides (gitignored): `backend/.env.local` (loaded after `.env`; Docker Compose also picks it up when the file exists)
|
||||
- Reference: `backend/.env.example`
|
||||
|
||||
Frontend:
|
||||
@@ -118,17 +119,9 @@ Important frontend variables:
|
||||
|
||||
---
|
||||
|
||||
## . ngrok Bridge for Local OAuth Callback
|
||||
## . Development with ngrok (OAuth)
|
||||
|
||||
To test OAuth callback from ORCID in local environments, compose can inject a public callback URL:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
ORCID_REDIRECT_URI: https://jargon-supreme-palpable.ngrok-free.dev/callback
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> Values under `docker-compose.yml -> services.backend.environment` override `backend/.env` inside the container.
|
||||
For ORCID OAuth in local development you need a **public HTTPS URL** that hits the same origin as the SPA. Run `docker compose up` as usual, then point ngrok at the **frontend** host port (for example `ngrok http 8073` when compose maps the UI to `8073`). Open the app **only** at `https://<your-subdomain>.ngrok-free.dev/orcid2sword/` so login, `/api` proxy, and the OAuth callback stay on one host (mixing `localhost` with an ngrok `ORCID_REDIRECT_URI` breaks the `state` cookie). Put `ORCID_REDIRECT_URI` to exactly `https://<your-subdomain>.ngrok-free.dev/orcid2sword/callback` in `backend/.env.local` (gitignored), register that **same** redirect URL on your ORCID sandbox app, and add the ngrok host to `CORS_ALLOWED_ORIGINS` and `TRUSTED_HOSTS`; restart the backend after edits. If the ngrok subdomain changes, update ORCID, `.env.local`, and restart again.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user