@absolutejs/auth 0.54.3 → 0.54.4

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/index.js CHANGED
@@ -9245,6 +9245,18 @@ var stepUpPlugin = ({
9245
9245
 
9246
9246
  // src/routes/signout.ts
9247
9247
  import { Elysia as Elysia29, t as t26 } from "elysia";
9248
+ var sessionForSignOut = ({
9249
+ authSessionStore,
9250
+ currentSession,
9251
+ session,
9252
+ userSessionId
9253
+ }) => {
9254
+ if (!authSessionStore)
9255
+ return session;
9256
+ if (!currentSession)
9257
+ return {};
9258
+ return { [userSessionId]: currentSession };
9259
+ };
9248
9260
  var runSignOut = async (onSignOut, args) => {
9249
9261
  try {
9250
9262
  await onSignOut?.(args);
@@ -9274,7 +9286,12 @@ var signout = ({
9274
9286
  return status("Unauthorized", "No user session id found");
9275
9287
  }
9276
9288
  const currentSession = authSessionStore ? await authSessionStore.getSession(user_session_id.value) : session[user_session_id.value];
9277
- const signoutSession = currentSession === undefined ? {} : { [user_session_id.value]: currentSession };
9289
+ const signoutSession = sessionForSignOut({
9290
+ authSessionStore,
9291
+ currentSession,
9292
+ session,
9293
+ userSessionId: user_session_id.value
9294
+ });
9278
9295
  if (currentSession !== undefined) {
9279
9296
  const signedOut = await runSignOut(onSignOut, {
9280
9297
  authProvider: auth_provider?.value,
@@ -27928,5 +27945,5 @@ export {
27928
27945
  AuthIdentityConflictError
27929
27946
  };
27930
27947
 
27931
- //# debugId=8FD44B77059462F264756E2164756E21
27948
+ //# debugId=3641271C853CFF2564756E2164756E21
27932
27949
  //# sourceMappingURL=index.js.map