/opt/canhelp/node_modules/better-auth/dist/client
Edit: /opt/canhelp/node_modules/better-auth/dist/client/fetch-plugins.mjs (434B)
//#region src/client/fetch-plugins.ts
const redirectPlugin = {
id: "redirect",
name: "Redirect",
hooks: { onSuccess(context) {
if (context.data?.url && context.data?.redirect) {
if (typeof window !== "undefined" && window.location) {
if (window.location) try {
window.location.href = context.data.url;
} catch {}
}
}
} }
};
//#endregion
export { redirectPlugin };
//# sourceMappingURL=fetch-plugins.mjs.map