@rttnd/gau 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-NX4HKWJR.js → chunk-H7HMOWU7.js} +1 -1
- package/dist/{chunk-NX4HKWJR.js.map → chunk-H7HMOWU7.js.map} +1 -1
- package/dist/src/client/svelte/index.svelte.js.map +1 -1
- package/dist/src/core/handlers/index.js +1 -1
- package/dist/src/core/index.d.ts +1 -1
- package/dist/src/core/index.d.ts.map +1 -1
- package/dist/src/core/index.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/jwt/index.js +1 -1
- package/dist/src/solidstart/index.js +1 -1
- package/dist/src/sveltekit/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{NULL_SESSION as e,REFRESHED_TOKEN_HEADER as r,createAuth as t,createHandler as n,getSessionTokenFromRequest as o,toClientSession as s}from"../../chunk-
|
|
1
|
+
import{NULL_SESSION as e,REFRESHED_TOKEN_HEADER as r,createAuth as t,createHandler as n,getSessionTokenFromRequest as o,toClientSession as s}from"../../chunk-H7HMOWU7.js";import"../../chunk-5KEP3AIT.js";function i(r){const i="providerMap"in r&&"signJWT"in r?r:t(r);i.errorRedirect||(i.errorRedirect="/auth/error"),(async()=>{try{i.development=(await import("$app/environment")).dev}catch{i.development=!1}})();const a=n(i),c=e=>a(e.request);return{GET:c,POST:c,OPTIONS:c,handle:async({event:r,resolve:t})=>{let n=null,a=null;const c=()=>n??=(async()=>{const{token:t}=o(r.request),n=Array.from(i.providerMap.keys());if(!t)return{...e,providers:n};try{const r=await i.validateSession(t);return r?{...r,providers:n}:{...e,providers:n}}catch{return{...e,providers:n}}})();return r.locals.getServerSession=c,r.locals.getSession=()=>a??=c().then(s),t(r)}}}function a(e,n={}){const o=function(e){return"providerMap"in e&&"signJWT"in e?e:t(e)}(e);return async({event:e,resolve:t})=>{const s=await o.refreshSession(e.request,n),i=await t(e);return s&&("cookie"===s.source?i.headers.set("Set-Cookie",s.cookie):i.headers.set(r,s.token)),i}}export{r as REFRESHED_TOKEN_HEADER,i as SvelteKitAuth,a as createRefreshHandle};//# sourceMappingURL=index.js.map
|