Repository navigation
Change session auth to pass around one-time redeemable tokens rather than session tokens - #8217
Prospector wants to merge 1 commit into
Conversation
|
Note This changelog has been merged into the changelog for #8142 Pull request changelogAppAddedChangedDeprecatedRemovedFixedSecurityWebsiteAddedChangedDeprecatedRemovedFixedSecurityHostingAddedChangedDeprecatedRemovedFixedSecurity |
[High impact] The change reaches OAuth sign-in across the website and launcher. The backend response-type requirement must be satisfied before merging; no new blocking behavior was found.
|
| pool: Data<PgPool>, | ||
| redis: Data<RedisPool>, | ||
| body: web::Json<ExchangeLoginCode>, | ||
| ) -> Result<HttpResponse, ApiError> { |
There was a problem hiding this comment.
exchange_login_code returns only JSON on success, but declares HttpResponse. The backend guide requires web::Json<T> when possible. Return web::Json<AuthSession> and finish with Ok(web::Json(session)) so Rust can check the response type. This repository requirement must be satisfied before merging.
Context Used: apps/labrinth/AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/labrinth/src/routes/internal/flows.rs
Line: 1605
Comment:
**Response type hides JSON**
`exchange_login_code` returns only JSON on success, but declares `HttpResponse`. The backend guide requires `web::Json<T>` when possible. Return `web::Json<AuthSession>` and finish with `Ok(web::Json(session))` so Rust can check the response type. This repository requirement must be satisfied before merging.
**Context Used:** apps/labrinth/AGENTS.md ([source](https://github.com/modrinth/code/blob/main/apps/labrinth/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Tick the box to add this pull request to the merge queue (same as
|
98495bb to
c9fcb8b
Compare
No description provided.