SDK reference
@synqauth/plugin-magic-link
A Synq plugin that sends people from your own UI to the hosted page's emailed code or magic link.
@synqauth/plugin-magic-link
MAGIC_LINK_PLUGIN_ID
Constant. The plugin's id: its actions are under it in usePlugin and the mount's plugin list.
const MAGIC_LINK_PLUGIN_ID: "magic-link"MagicLinkActions
Interface. What the magic-link plugin does from the page: where to send the person to get a code or link by email.
interface MagicLinkActions {
signInUrl: (options?: {
email?: string;
returnTo?: string;
}) => string;
}magicLinkPlugin
Function. The magic-link plugin: the brand's email step, with the person's address filled in.
function magicLinkPlugin(options?: MagicLinkPluginOptions): MagicLinkPluginMagicLinkPlugin
Interface. The magic-link plugin, in SynqClientPlugin's shape: for <SynqProvider plugins> or @synqauth/nextjs/client.
interface MagicLinkPlugin {
readonly id: typeof MAGIC_LINK_PLUGIN_ID;
actions: (request: MountRequest) => MagicLinkActions;
}MagicLinkPluginOptions
Interface. What magicLinkPlugin() takes.
interface MagicLinkPluginOptions {
basePath?: string;
}MountRequest
Type. Calls the app's route mount, from its own page: what
type MountRequest = (path: string, init?: RequestInit) => Promise<Response>;See every package.