@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) • 653 B
TypeScript
import { User } from "../user.js";
import { AuthError, Result } from "./utils.js";
//#region src/auth/methods/magicLink.d.ts
/**
* Signs a visitor in with the token from a magic link they followed.
*
* The token keeps working after it is used, so anyone holding the link can sign
* in as that visitor. Never log it, and redirect away from the URL that carried
* it.
*
*/
declare function signInWithMagicLink(credentials: {
token: string;
}): Promise<Result<{
status: "signedIn";
user: User;
} | {
status: "authenticatorRequired";
step: "verify" | "setup" | "setupOptional";
}, AuthError>>;
//#endregion
export { signInWithMagicLink };