@sourceregistry/sveltekit-oidc 1.6.4 → 1.6.6

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.
@@ -248,8 +248,12 @@ export type OIDCInstance<TClaims extends OIDCUserClaims = OIDCUserClaims, TSessi
248
248
  oidc: OIDCHandleLocals<TClaims, TSession>;
249
249
  }>;
250
250
  getMetadata: () => Promise<OIDCDiscoveryDocument>;
251
- getSession: (event: RequestEvent) => Promise<TSession | null>;
252
- getPublicSession: (event: RequestEvent) => Promise<OIDCPublicSession<TClaims> | null>;
251
+ getSession: (event: {
252
+ cookies: RequestEvent['cookies'];
253
+ }) => Promise<TSession | null>;
254
+ getPublicSession: (event: {
255
+ cookies: RequestEvent['cookies'];
256
+ }) => Promise<OIDCPublicSession<TClaims> | null>;
253
257
  getSessionManagementConfig: () => Promise<OIDCSessionManagementConfig>;
254
258
  login: (event: RequestEvent, loginOptions?: OIDCLoginOptions) => Promise<never>;
255
259
  logout: (event: RequestEvent, logoutOptions?: OIDCLogoutOptions) => Promise<never>;
@@ -263,7 +267,10 @@ export type OIDCInstance<TClaims extends OIDCUserClaims = OIDCUserClaims, TSessi
263
267
  login: Action;
264
268
  logout: Action;
265
269
  }>;
266
- requireAuth: (event: RequestEvent, returnTo?: string) => Promise<TSession>;
270
+ requireAuth: (event: {
271
+ cookies: Cookies;
272
+ url: URL;
273
+ }, returnTo?: string) => Promise<TSession>;
267
274
  clearSession: (cookies: Cookies) => Promise<void>;
268
275
  };
269
276
  export type OIDCInferClaims<T> = T extends OIDCInstance<infer TClaims> ? TClaims : OIDCUserClaims;
@@ -1,4 +1,3 @@
1
- import { type RequestEvent } from '@sveltejs/kit';
2
1
  import type { CookieOptions, OIDCPublicSession, OIDCSession, OIDCUserClaims } from './types.js';
3
2
  export declare function base64UrlEncode(value: string | Uint8Array): string;
4
3
  export declare function createPKCEPair(length?: number): {
@@ -14,7 +13,13 @@ export declare function verifySignedValue(value: string, secret: string): string
14
13
  export declare function serializeSignedCookie(payload: unknown, secret: string): string;
15
14
  export declare function parseSignedCookie<T>(value: string | undefined, secret: string): T | null;
16
15
  export declare function buildCookieOptions(options?: Partial<CookieOptions>): CookieOptions;
17
- export declare function parseProviderError(event: RequestEvent): null;
18
- export declare function absoluteUrl(event: RequestEvent, pathOrUrl: string): string;
19
- export declare function internalRedirectPath(event: RequestEvent, pathOrUrl: string | undefined, fallback?: string): string;
16
+ export declare function parseProviderError(event: {
17
+ url: URL;
18
+ }): null;
19
+ export declare function absoluteUrl(event: {
20
+ url: URL;
21
+ }, pathOrUrl: string): string;
22
+ export declare function internalRedirectPath(event: {
23
+ url: URL;
24
+ }, pathOrUrl: string | undefined, fallback?: string): string;
20
25
  export declare function toPublicSession<TClaims extends OIDCUserClaims = OIDCUserClaims>(session: OIDCSession<TClaims> | null): OIDCPublicSession<TClaims> | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sourceregistry/sveltekit-oidc",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "description": "OIDC authentication helpers for SvelteKit applications",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {