Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions crates/beacon-worker/src/wasm/oidc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ pub async fn handle_authorize(req: &Request, env: &Env) -> Result<Response> {
let mut login = Url::parse(&format!("{}/login", jwt_issuer(env).await?))?;
login
.query_pairs_mut()
.append_pair("oidc", "1")
.append_pair("client_id", &query.client_id)
.append_pair("redirect_uri", &query.redirect_uri)
.append_pair("scope", query.scope.as_deref().unwrap_or("openid"))
Expand All @@ -232,7 +231,6 @@ pub async fn handle_authorize(req: &Request, env: &Env) -> Result<Response> {
let mut login = Url::parse(&format!("{}/login", jwt.issuer.trim_end_matches('/')))?;
login
.query_pairs_mut()
.append_pair("oidc", "1")
.append_pair("client_id", &query.client_id)
.append_pair("redirect_uri", &query.redirect_uri)
.append_pair("scope", query.scope.as_deref().unwrap_or("openid"))
Expand Down
1 change: 0 additions & 1 deletion crates/beacon/src/handlers/oidc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ fn login_redirect(
let mut login = Url::parse(&format!("{issuer}/login")).unwrap();
login
.query_pairs_mut()
.append_pair("oidc", "1")
.append_pair("client_id", query.get("client_id").map(String::as_str).unwrap_or(""))
.append_pair("redirect_uri", query.get("redirect_uri").map(String::as_str).unwrap_or(""))
.append_pair("scope", query.get("scope").map(String::as_str).unwrap_or("openid"))
Expand Down
4 changes: 1 addition & 3 deletions src/lib/minecraft-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { z } from 'zod';
* with the code (the mod exchanges it at the token endpoint itself).
*/
export const oidcSearchSchema = z.object({
oidc: z.literal('1').optional(),
client_id: z.string().optional(),
redirect_uri: z.string().optional(),
scope: z.string().optional(),
Expand All @@ -26,8 +25,7 @@ export function isOidcFlow(
params: OidcSearchParams,
): params is Required<OidcSearchParams> {
return Boolean(
params.oidc === '1' &&
params.client_id &&
params.client_id &&
params.redirect_uri &&
params.code_challenge &&
params.nonce,
Expand Down
6 changes: 3 additions & 3 deletions src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { routeTree } from './routeTree.gen';

/**
* TanStack Router's default `parseSearch` coerces query-string values into
* booleans/numbers via `JSON.parse` (e.g. `oidc=1` becomes the number `1`).
* The search-param schemas expect raw strings (e.g. `z.literal('1')`), so the
* coercion makes validation fail. We keep every value a string.
* booleans/numbers via `JSON.parse` (e.g. `1` becomes the number `1`, `true`
* becomes the boolean `true`). The OIDC/OAuth search-param schemas expect raw
* strings, so we keep every value a string.
*/
const parseSearch = parseSearchWith((value) => value);
// The stringify parser must throw for plain strings so they stay unencoded;
Expand Down
1 change: 0 additions & 1 deletion src/routes/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,6 @@ function LoginPage() {
<Link
to="/register"
search={{
oidc: searchParams.oidc,
client_id: searchParams.client_id,
redirect_uri: searchParams.redirect_uri,
scope: searchParams.scope,
Expand Down
1 change: 0 additions & 1 deletion src/routes/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ function RegisterPage() {
<Link
to="/login"
search={{
oidc: searchParams.oidc,
client_id: searchParams.client_id,
redirect_uri: searchParams.redirect_uri,
scope: searchParams.scope,
Expand Down
Loading