Module exposing: getSSOConfig, prepareSSOSignIn, signInWithSSO
// Source: https://github.com/usememos/memos | License: MIT | Copyright 2025 Memos
// Provided via justclaw.it.com; keep this notice with the code.
import { absolutifyLink } from "@/lib/browser";
import { ROUTES } from "@/router/routes";
import { IdentityProvider, IdentityProvider_Type } from "@/types/proto/api/idp_service_pb";
import { getSafeRedirectPath } from "@/utils/auth-redirect";
import { storeOAuthState } from "@/utils/oauth";
export function getSSOConfig(identityProvider: IdentityProvider) {
if (identityProvider.type !== IdentityProvider_Type.OAUTH2 || identityProvider.config?.config.case !== "oauth2Config") {
return undefined;
}
const config = identityProvider.config.config.value;
return config.authUrl && config.clientId ? config : undefined;
}
/** Prepares the sam
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key