refactor(packages/client): 🔥 Remove broken SSO login code

This commit is contained in:
Jesse Wierzbinski 2025-11-21 12:17:02 +01:00
parent 59ad71964b
commit d18f135fbd
No known key found for this signature in database

View file

@ -2814,44 +2814,6 @@ export class Client extends BaseClient {
);
}
public startSsoLogin(
issuer: string,
client_id: string,
redirect_uri: URL,
options?: Partial<{
scopes: string[];
state: string;
}>,
extra?: RequestInit,
): Promise<URL> {
return this.post(
`/oauth/sso/${issuer}`,
{
client_id,
redirect_uri: redirect_uri.toString(),
scopes: options?.scopes,
state: options?.state,
},
extra,
).then((output) => {
const isRedirect = output.raw.status === 302;
if (!isRedirect) {
throw new Error(
`Expected redirect response but got status ${output.raw.status}`,
);
}
const location = output.raw.headers.get("Location");
if (!location) {
throw new Error("Redirect response missing Location header");
}
return new URL(location);
});
}
// TODO: streamingURL
/**