@iqauth/sdk 2.1.0 → 2.3.0
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/README.md +43 -3
- package/dist/browser-session.d.mts +1 -2
- package/dist/browser-session.d.ts +1 -2
- package/dist/browser-session.js +89 -68
- package/dist/browser-session.mjs +2 -1
- package/dist/browser.d.mts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +69 -7
- package/dist/browser.mjs +2 -2
- package/dist/{chunk-ZESHDJDU.mjs → chunk-EKTNEZIH.mjs} +5 -8
- package/dist/{chunk-JQRTY5MY.mjs → chunk-KGEPDXHU.mjs} +12 -8
- package/dist/{chunk-S3M2IXCE.mjs → chunk-RACIPVLD.mjs} +15 -9
- package/dist/chunk-UNYDG2L4.mjs +209 -0
- package/dist/{chunk-MDUHPQMM.mjs → chunk-W3F4JYGP.mjs} +8 -180
- package/dist/chunk-WQWBJSSS.mjs +119 -0
- package/dist/cli/index.js +21 -0
- package/dist/cli/index.mjs +1 -1
- package/dist/{client-DXbHb2ul.d.ts → client-DTX4hNdS.d.ts} +16 -21
- package/dist/{client-Dv4v92Mj.d.mts → client-vdh2a9fJ.d.mts} +16 -21
- package/dist/{doctor-OHJRZBBT.mjs → doctor-A5E7LSFW.mjs} +2 -1
- package/dist/{express-BZmF1llh.d.mts → express-A0-dWEMy.d.mts} +1 -1
- package/dist/{express-B4o3P8vK.d.ts → express-Bo_pJKHN.d.ts} +1 -1
- package/dist/express.d.mts +75 -5
- package/dist/express.d.ts +75 -5
- package/dist/express.js +353 -94
- package/dist/express.mjs +210 -12
- package/dist/fastify.js +153 -88
- package/dist/fastify.mjs +10 -9
- package/dist/hono.js +152 -88
- package/dist/hono.mjs +9 -9
- package/dist/index.d.mts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.js +148 -72
- package/dist/index.mjs +16 -12
- package/dist/mobile.d.mts +1 -2
- package/dist/mobile.d.ts +1 -2
- package/dist/mobile.js +89 -68
- package/dist/mobile.mjs +2 -1
- package/dist/next.d.mts +9 -0
- package/dist/next.d.ts +9 -0
- package/dist/next.js +164 -1649
- package/dist/next.mjs +13 -16
- package/dist/{publishableKey-B5DIK81A.d.mts → publishableKey-BaR0HoAH.d.mts} +10 -1
- package/dist/{publishableKey-B5DIK81A.d.ts → publishableKey-BaR0HoAH.d.ts} +10 -1
- package/dist/react.d.mts +35 -3
- package/dist/react.d.ts +35 -3
- package/dist/react.js +78 -18
- package/dist/react.mjs +14 -2
- package/dist/server/handlers.d.mts +2 -0
- package/dist/server/handlers.d.ts +2 -0
- package/dist/server/handlers.js +72 -17
- package/dist/server/handlers.mjs +3 -2
- package/dist/server.d.mts +2 -3
- package/dist/server.d.ts +2 -3
- package/dist/server.js +151 -89
- package/dist/server.mjs +7 -6
- package/dist/service.d.mts +1 -2
- package/dist/service.d.ts +1 -2
- package/dist/service.js +89 -68
- package/dist/service.mjs +2 -1
- package/dist/{signIn-CEMdUAwd.d.mts → signIn-Cd0P4y9d.d.mts} +9 -1
- package/dist/{signIn-VRNzlNyG.d.ts → signIn-DKakyzeu.d.ts} +9 -1
- package/package.json +3 -2
- package/dist/chunk-5WFR6Y33.mjs +0 -59
package/dist/mobile.mjs
CHANGED
package/dist/next.d.mts
CHANGED
|
@@ -25,6 +25,15 @@ declare function handler(options: IQAuthNextOptions): (req: Request) => Promise<
|
|
|
25
25
|
/**
|
|
26
26
|
* Edge-compatible Next.js middleware factory. Returns a function suitable
|
|
27
27
|
* for `export const middleware = createMiddleware({ ... })`.
|
|
28
|
+
*
|
|
29
|
+
* Behavior: reads a Bearer token from the `Authorization` header or the
|
|
30
|
+
* access cookie (`iqauth_at` by default), verifies its signature against
|
|
31
|
+
* the issuer's JWKS using `jose` (Web Crypto, edge-safe), and on failure
|
|
32
|
+
* returns a 401 JSON response. The middleware does NOT transparently
|
|
33
|
+
* refresh expired access tokens — refresh happens in the browser SDK
|
|
34
|
+
* (single-flight) or by calling `POST /api/iqauth/refresh`. Pair this
|
|
35
|
+
* middleware with the helper routes mounted by `attachHelpers` for the
|
|
36
|
+
* full session lifecycle.
|
|
28
37
|
*/
|
|
29
38
|
declare function createMiddleware(options: IQAuthNextOptions): (req: Request) => Promise<Response | undefined>;
|
|
30
39
|
/**
|
package/dist/next.d.ts
CHANGED
|
@@ -25,6 +25,15 @@ declare function handler(options: IQAuthNextOptions): (req: Request) => Promise<
|
|
|
25
25
|
/**
|
|
26
26
|
* Edge-compatible Next.js middleware factory. Returns a function suitable
|
|
27
27
|
* for `export const middleware = createMiddleware({ ... })`.
|
|
28
|
+
*
|
|
29
|
+
* Behavior: reads a Bearer token from the `Authorization` header or the
|
|
30
|
+
* access cookie (`iqauth_at` by default), verifies its signature against
|
|
31
|
+
* the issuer's JWKS using `jose` (Web Crypto, edge-safe), and on failure
|
|
32
|
+
* returns a 401 JSON response. The middleware does NOT transparently
|
|
33
|
+
* refresh expired access tokens — refresh happens in the browser SDK
|
|
34
|
+
* (single-flight) or by calling `POST /api/iqauth/refresh`. Pair this
|
|
35
|
+
* middleware with the helper routes mounted by `attachHelpers` for the
|
|
36
|
+
* full session lifecycle.
|
|
28
37
|
*/
|
|
29
38
|
declare function createMiddleware(options: IQAuthNextOptions): (req: Request) => Promise<Response | undefined>;
|
|
30
39
|
/**
|