@better-auth-ui/core
Version:
Authentication components and data utilities for [Better Auth](https://better-auth.com), available for React and Solid.
38 lines (37 loc) • 944 B
JavaScript
import { t as e } from "../../create-auth-plugin-BXWyolC8.js";
//#region src/plugins/magic-link/magic-link-localization.ts
var t = {
magicLink: "Magic Link",
sendMagicLink: "Send Magic Link",
magicLinkSent: "Check your email for the magic link",
magicLinkSentTo: "We sent a magic link to {{email}}"
}, n = { signIn: [
"auth",
"signIn",
"magicLink"
] }, r = e("magicLink", (e = {}) => ({
localization: {
...t,
...e.localization
},
viewPaths: { auth: {
magicLink: e.path ?? "magic-link",
magicLinkSent: e.sentPath ?? "magic-link-sent"
} }
}));
//#endregion
//#region src/plugins/magic-link/sign-in-magic-link-mutation.ts
function i(e) {
return {
mutationKey: n.signIn,
mutationFn: (t) => e.signIn.magicLink({
...t,
fetchOptions: {
...t?.fetchOptions,
throw: !0
}
})
};
}
//#endregion
export { t as magicLinkLocalization, n as magicLinkMutationKeys, r as magicLinkPlugin, i as signInMagicLinkOptions };