diff --git a/crates/beacon-worker/src/wasm/oidc.rs b/crates/beacon-worker/src/wasm/oidc.rs index aced94c..da267a0 100644 --- a/crates/beacon-worker/src/wasm/oidc.rs +++ b/crates/beacon-worker/src/wasm/oidc.rs @@ -213,7 +213,6 @@ pub async fn handle_authorize(req: &Request, env: &Env) -> Result { 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")) @@ -232,7 +231,6 @@ pub async fn handle_authorize(req: &Request, env: &Env) -> Result { 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")) diff --git a/crates/beacon/src/handlers/oidc.rs b/crates/beacon/src/handlers/oidc.rs index 795c484..36257b5 100644 --- a/crates/beacon/src/handlers/oidc.rs +++ b/crates/beacon/src/handlers/oidc.rs @@ -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")) diff --git a/src/lib/minecraft-flow.ts b/src/lib/minecraft-flow.ts index f085f11..5aed0c7 100644 --- a/src/lib/minecraft-flow.ts +++ b/src/lib/minecraft-flow.ts @@ -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(), @@ -26,8 +25,7 @@ export function isOidcFlow( params: OidcSearchParams, ): params is Required { return Boolean( - params.oidc === '1' && - params.client_id && + params.client_id && params.redirect_uri && params.code_challenge && params.nonce, diff --git a/src/router.tsx b/src/router.tsx index b26867e..1e55eb8 100644 --- a/src/router.tsx +++ b/src/router.tsx @@ -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; diff --git a/src/routes/login.tsx b/src/routes/login.tsx index 1c0d004..602cd1d 100644 --- a/src/routes/login.tsx +++ b/src/routes/login.tsx @@ -444,7 +444,6 @@ function LoginPage() {