Skip to content

Commit 6f4b21f

Browse files
committed
feat: update routes listing response
1 parent cf56502 commit 6f4b21f

4 files changed

Lines changed: 29 additions & 30 deletions

File tree

AGENTS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,19 @@
7171
- Schema changes include a migration and verification.
7272
- New backend behavior follows thin-route and service-layer separation.
7373
- No new dependencies were added unless explicitly requested.
74+
75+
## Auth Testing
76+
77+
Local auth testing supports Mailpit for SMTP capture, a dev auth sandbox at `/__dev/auth-sandbox`, and opt-in provider smoke tests.
78+
79+
See [`docs/auth-testing.md`](docs/auth-testing.md) for the exact `.env` values, Google OAuth setup, and end-to-end test workflow.
80+
81+
For Flutter client integration guidance, see [`docs/flutter-auth-integration.md`](docs/flutter-auth-integration.md).
82+
83+
For the self-hosted PowerSync sandbox and sync validation workflow, see [`docs/powersync-sandbox.md`](docs/powersync-sandbox.md).
84+
85+
To build the dev sandbox assets without the Vite dev server:
86+
87+
```bash
88+
npm --prefix frontend/dev-pages run build
89+
```

README.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,3 @@ Run tests:
5454
```bash
5555
uv run pytest --cov --cov-report html
5656
```
57-
58-
## Auth Testing
59-
60-
Local auth testing supports Mailpit for SMTP capture, a dev auth sandbox at `/__dev/auth-sandbox`, and opt-in provider smoke tests.
61-
62-
See [`docs/auth-testing.md`](docs/auth-testing.md) for the exact `.env` values, Google OAuth setup, and end-to-end test workflow.
63-
64-
For Flutter client integration guidance, see [`docs/flutter-auth-integration.md`](docs/flutter-auth-integration.md).
65-
66-
For the self-hosted PowerSync sandbox and sync validation workflow, see [`docs/powersync-sandbox.md`](docs/powersync-sandbox.md).
67-
68-
To build the dev sandbox assets without the Vite dev server:
69-
70-
```bash
71-
npm --prefix frontend/dev-pages run build
72-
```

papyrus/api/routes/auth.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,13 @@ def _public_callback_url(request: Request, route_name: str) -> str:
5656
route_parts = urlsplit(route_url)
5757
public_parts = urlsplit(public_base_url.rstrip("/"))
5858

59-
return urlunsplit(
60-
(
61-
public_parts.scheme,
62-
public_parts.netloc,
63-
route_parts.path,
64-
route_parts.query,
65-
route_parts.fragment,
66-
)
67-
)
59+
return urlunsplit((
60+
public_parts.scheme,
61+
public_parts.netloc,
62+
route_parts.path,
63+
route_parts.query,
64+
route_parts.fragment,
65+
))
6866

6967

7068
@router.post(

papyrus/main.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def create_app() -> FastAPI:
109109

110110
app.state.limiter = limiter
111111
app.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler) # type: ignore
112+
112113
app.mount(
113114
DEV_PAGES_STATIC_URL,
114115
StaticFiles(directory=str(DEV_PAGES_DIST_DIR), check_dir=False),
@@ -162,19 +163,19 @@ async def index(request: Request) -> dict[str, object]:
162163
pages: list[dict[str, str]] = []
163164

164165
if app.docs_url is not None:
165-
pages.append({"name": "docs", "path": app.docs_url})
166+
pages.append({"name": "docs", "path": f"{settings.public_base_url}{app.docs_url}"})
166167

167168
if app.redoc_url is not None:
168-
pages.append({"name": "redoc", "path": app.redoc_url})
169+
pages.append({"name": "redoc", "path": f"{settings.public_base_url}{app.redoc_url}"})
169170

170171
if app.openapi_url is not None:
171-
pages.append({"name": "openapi", "path": app.openapi_url})
172+
pages.append({"name": "openapi", "path": f"{settings.public_base_url}{app.openapi_url}"})
172173

173174
if any(route.path == "/__dev/auth-sandbox" for route in request.app.routes):
174-
pages.append({"name": "auth_sandbox", "path": "/__dev/auth-sandbox"})
175+
pages.append({"name": "auth_sandbox", "path": f"{settings.public_base_url}/__dev/auth-sandbox"})
175176

176177
if any(route.path == "/__dev/powersync-sandbox" for route in request.app.routes):
177-
pages.append({"name": "powersync_sandbox", "path": "/__dev/powersync-sandbox"})
178+
pages.append({"name": "powersync_sandbox", "path": f"{settings.public_base_url}/__dev/powersync-sandbox"})
178179

179180
return {
180181
"name": "Papyrus Server API",

0 commit comments

Comments
 (0)