@softr/sdk
Version:
The SDK for building Softr apps on TanStack Start. It lets an app interact with Softr: auth, datasources, workflows and integrations.
24 lines (22 loc) • 924 B
TypeScript
import "@tanstack/react-start";
//#region src/auth/sso.d.ts
/**
* Where a link or button sends a visitor to sign in with single sign-on. They
* come back to `returnPath` once signed in. Without one, they land where
* `auth.guard.alreadyAuthenticated` in softr.json points, as after any sign-in.
*
* A full page load, not a router navigation: the visitor leaves the app for
* their identity provider.
*
* @example
* <a href={ssoSignInHref(toReturnPath(location).href)}>Continue with SSO</a>
*/
declare function ssoSignInHref(returnPath?: string): string;
/**
* Why single sign-on did not finish, as the `error` search param of the SSO
* page. Never the platform's own message: that is for the builder, and it would
* sit in the visitor's address bar.
*/
type SsoError = "host" | "idp" | "not-enabled" | "sign-up-disabled" | "restricted" | "expired" | "failed";
//#endregion
export { SsoError, ssoSignInHref };