|
| 1 | +diff --git a/index.qwik.js b/index.qwik.js |
| 2 | +index 344a147d81a24d041488239401b91b078b061edc..fb2a82aa97625549d468e86cf78b16a265ebbc5f 100644 |
| 3 | +--- a/index.qwik.js |
| 4 | ++++ b/index.qwik.js |
| 5 | +@@ -1,7 +1,6 @@ |
| 6 | + import { globalActionQrl, zodQrl, z, routeLoaderQrl } from "@builder.io/qwik-city"; |
| 7 | + import { inlinedQrl, useLexicalScope, implicit$FirstArg } from "@builder.io/qwik"; |
| 8 | +-import { Auth, skipCSRFCheck, isAuthAction } from "@auth/core"; |
| 9 | +-import { customFetch } from "@auth/core"; |
| 10 | ++import { customFetch as customFetch$1, Auth, skipCSRFCheck, isAuthAction } from "@auth/core"; |
| 11 | + import { isServer } from "@builder.io/qwik/build"; |
| 12 | + var setCookie = { exports: {} }; |
| 13 | + var defaultParseOptions = { |
| 14 | +@@ -292,9 +291,11 @@ AccountNotLinked.type = "AccountNotLinked"; |
| 15 | + class ExperimentalFeatureNotEnabled extends AuthError { |
| 16 | + } |
| 17 | + ExperimentalFeatureNotEnabled.type = "ExperimentalFeatureNotEnabled"; |
| 18 | ++const customFetch = isServer ? customFetch$1 : void 0; |
| 19 | + function QwikAuthQrl(authOptions) { |
| 20 | + const useSignIn = globalActionQrl(/* @__PURE__ */ inlinedQrl(async ({ providerId, redirectTo: _redirectTo, options, authorizationParams }, req) => { |
| 21 | + const [authOptions2] = useLexicalScope(); |
| 22 | ++ if (!isServer) return; |
| 23 | + const { redirectTo = _redirectTo ?? defaultRedirectTo(req), ...rest } = options ?? {}; |
| 24 | + const isCredentials = providerId === "credentials"; |
| 25 | + const authOpts = await authOptions2(req); |
| 26 | +@@ -325,6 +326,7 @@ function QwikAuthQrl(authOptions) { |
| 27 | + }, "QwikAuthQrl_useSignIn_globalAction_zod_X0EcrMISJRM"))); |
| 28 | + const useSignOut = globalActionQrl(/* @__PURE__ */ inlinedQrl(async ({ redirectTo }, req) => { |
| 29 | + const [authOptions2] = useLexicalScope(); |
| 30 | ++ if (!isServer) return; |
| 31 | + redirectTo ?? (redirectTo = defaultRedirectTo(req)); |
| 32 | + const authOpts = await authOptions2(req); |
| 33 | + setEnvDefaults(req.env, authOpts); |
| 34 | +@@ -431,6 +433,7 @@ async function getSessionData(req, options) { |
| 35 | + throw new Error(data.message); |
| 36 | + } |
| 37 | + const setEnvDefaults = (env, config) => { |
| 38 | ++ if (!isServer) return; |
| 39 | + config.basePath = "/auth"; |
| 40 | + if (!config.secret?.length) { |
| 41 | + config.secret = []; |
0 commit comments