@iqauth/sdk 2.0.4 → 2.1.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/dist/browser-session.d.mts +1 -1
- package/dist/browser-session.d.ts +1 -1
- package/dist/browser-session.js +4 -1
- package/dist/browser-session.mjs +1 -1
- package/dist/{chunk-JQWYIIIS.mjs → chunk-MDUHPQMM.mjs} +4 -1
- package/dist/{chunk-73R6BEGO.mjs → chunk-ZESHDJDU.mjs} +1 -1
- package/dist/{client-CggvJmmm.d.ts → client-DXbHb2ul.d.ts} +1 -1
- package/dist/{client-C1DXfB8Z.d.mts → client-Dv4v92Mj.d.mts} +1 -1
- package/dist/{express-BKAXB5Nl.d.ts → express-B4o3P8vK.d.ts} +1 -1
- package/dist/{express-CpfyYTmw.d.mts → express-BZmF1llh.d.mts} +1 -1
- package/dist/express.d.mts +3 -3
- package/dist/express.d.ts +3 -3
- package/dist/express.js +4 -1
- package/dist/express.mjs +2 -2
- package/dist/fastify.d.mts +6 -0
- package/dist/fastify.d.ts +6 -0
- package/dist/fastify.js +21 -3
- package/dist/fastify.mjs +18 -3
- package/dist/hono.js +4 -1
- package/dist/hono.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -1
- package/dist/index.mjs +2 -2
- package/dist/mobile.d.mts +1 -1
- package/dist/mobile.d.ts +1 -1
- package/dist/mobile.js +4 -1
- package/dist/mobile.mjs +1 -1
- package/dist/next.js +4 -1
- package/dist/next.mjs +1 -1
- package/dist/react.d.mts +64 -2
- package/dist/react.d.ts +64 -2
- package/dist/react.js +501 -132
- package/dist/react.mjs +498 -132
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +4 -1
- package/dist/server.mjs +2 -2
- package/dist/service.d.mts +1 -1
- package/dist/service.d.ts +1 -1
- package/dist/service.js +4 -1
- package/dist/service.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as IQAuthBrowserSessionClientConfig, d as SessionUser } from './types-Cxl3bQHt.mjs';
|
|
2
|
-
import { I as IQAuthClient } from './client-
|
|
2
|
+
import { I as IQAuthClient } from './client-Dv4v92Mj.mjs';
|
|
3
3
|
export { E as ErrorCodes, I as IQAuthError } from './errors-CDdl24MP.mjs';
|
|
4
4
|
import 'jsonwebtoken';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as IQAuthBrowserSessionClientConfig, d as SessionUser } from './types-Cxl3bQHt.js';
|
|
2
|
-
import { I as IQAuthClient } from './client-
|
|
2
|
+
import { I as IQAuthClient } from './client-DXbHb2ul.js';
|
|
3
3
|
export { E as ErrorCodes, I as IQAuthError } from './errors-CDdl24MP.js';
|
|
4
4
|
import 'jsonwebtoken';
|
|
5
5
|
|
package/dist/browser-session.js
CHANGED
|
@@ -449,7 +449,10 @@ function parseMfaResponse(data, browserSessionMode) {
|
|
|
449
449
|
var import_crypto = __toESM(require("crypto"));
|
|
450
450
|
var import_jsonwebtoken = __toESM(require("jsonwebtoken"));
|
|
451
451
|
var JWKS_CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
452
|
-
var DEFAULT_TOKEN_ISSUER =
|
|
452
|
+
var DEFAULT_TOKEN_ISSUER = [
|
|
453
|
+
"https://auth.dispositioniq.com",
|
|
454
|
+
"auth.dispositioniq.com"
|
|
455
|
+
];
|
|
453
456
|
var DEFAULT_TOKEN_AUDIENCE = [
|
|
454
457
|
"dispositioniq",
|
|
455
458
|
"iqcapture",
|
package/dist/browser-session.mjs
CHANGED
|
@@ -164,7 +164,10 @@ function parseMfaResponse(data, browserSessionMode) {
|
|
|
164
164
|
import crypto from "crypto";
|
|
165
165
|
import jwt from "jsonwebtoken";
|
|
166
166
|
var JWKS_CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
167
|
-
var DEFAULT_TOKEN_ISSUER =
|
|
167
|
+
var DEFAULT_TOKEN_ISSUER = [
|
|
168
|
+
"https://auth.dispositioniq.com",
|
|
169
|
+
"auth.dispositioniq.com"
|
|
170
|
+
];
|
|
168
171
|
var DEFAULT_TOKEN_AUDIENCE = [
|
|
169
172
|
"dispositioniq",
|
|
170
173
|
"iqcapture",
|
|
@@ -92,7 +92,7 @@ declare class AuthModule {
|
|
|
92
92
|
* - Last verified: Phase 0 Research Summary
|
|
93
93
|
*/
|
|
94
94
|
|
|
95
|
-
declare const DEFAULT_TOKEN_ISSUER
|
|
95
|
+
declare const DEFAULT_TOKEN_ISSUER: string[];
|
|
96
96
|
declare const DEFAULT_TOKEN_AUDIENCE: string[];
|
|
97
97
|
declare const DEFAULT_CLOCK_TOLERANCE_SECONDS = 30;
|
|
98
98
|
interface TokenVerifyOptions {
|
|
@@ -92,7 +92,7 @@ declare class AuthModule {
|
|
|
92
92
|
* - Last verified: Phase 0 Research Summary
|
|
93
93
|
*/
|
|
94
94
|
|
|
95
|
-
declare const DEFAULT_TOKEN_ISSUER
|
|
95
|
+
declare const DEFAULT_TOKEN_ISSUER: string[];
|
|
96
96
|
declare const DEFAULT_TOKEN_AUDIENCE: string[];
|
|
97
97
|
declare const DEFAULT_CLOCK_TOLERANCE_SECONDS = 30;
|
|
98
98
|
interface TokenVerifyOptions {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IQAuthClient } from './client-
|
|
1
|
+
import { I as IQAuthClient } from './client-DXbHb2ul.js';
|
|
2
2
|
import { J as JwtClaims, N as ExpressMiddlewareOptions, Q as IQAuthRequestLike, R as IQAuthResponseLike, V as IQAuthNextFunction } from './types-Cxl3bQHt.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IQAuthClient } from './client-
|
|
1
|
+
import { I as IQAuthClient } from './client-Dv4v92Mj.mjs';
|
|
2
2
|
import { J as JwtClaims, N as ExpressMiddlewareOptions, Q as IQAuthRequestLike, R as IQAuthResponseLike, V as IQAuthNextFunction } from './types-Cxl3bQHt.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/express.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as IQAuthClient } from './client-
|
|
2
|
-
import { C as CookieAwareMiddlewareOptions } from './express-
|
|
3
|
-
export { i as iqAuthMiddleware } from './express-
|
|
1
|
+
import { I as IQAuthClient } from './client-Dv4v92Mj.mjs';
|
|
2
|
+
import { C as CookieAwareMiddlewareOptions } from './express-BZmF1llh.mjs';
|
|
3
|
+
export { i as iqAuthMiddleware } from './express-BZmF1llh.mjs';
|
|
4
4
|
import { IQAuthHelperConfig } from './server/handlers.mjs';
|
|
5
5
|
import { Q as IQAuthRequestLike, R as IQAuthResponseLike, V as IQAuthNextFunction } from './types-Cxl3bQHt.mjs';
|
|
6
6
|
export { E as ErrorCodes, I as IQAuthError } from './errors-CDdl24MP.mjs';
|
package/dist/express.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as IQAuthClient } from './client-
|
|
2
|
-
import { C as CookieAwareMiddlewareOptions } from './express-
|
|
3
|
-
export { i as iqAuthMiddleware } from './express-
|
|
1
|
+
import { I as IQAuthClient } from './client-DXbHb2ul.js';
|
|
2
|
+
import { C as CookieAwareMiddlewareOptions } from './express-B4o3P8vK.js';
|
|
3
|
+
export { i as iqAuthMiddleware } from './express-B4o3P8vK.js';
|
|
4
4
|
import { IQAuthHelperConfig } from './server/handlers.js';
|
|
5
5
|
import { Q as IQAuthRequestLike, R as IQAuthResponseLike, V as IQAuthNextFunction } from './types-Cxl3bQHt.js';
|
|
6
6
|
export { E as ErrorCodes, I as IQAuthError } from './errors-CDdl24MP.js';
|
package/dist/express.js
CHANGED
|
@@ -448,7 +448,10 @@ function parseMfaResponse(data, browserSessionMode) {
|
|
|
448
448
|
var import_crypto = __toESM(require("crypto"));
|
|
449
449
|
var import_jsonwebtoken = __toESM(require("jsonwebtoken"));
|
|
450
450
|
var JWKS_CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
451
|
-
var DEFAULT_TOKEN_ISSUER =
|
|
451
|
+
var DEFAULT_TOKEN_ISSUER = [
|
|
452
|
+
"https://auth.dispositioniq.com",
|
|
453
|
+
"auth.dispositioniq.com"
|
|
454
|
+
];
|
|
452
455
|
var DEFAULT_TOKEN_AUDIENCE = [
|
|
453
456
|
"dispositioniq",
|
|
454
457
|
"iqcapture",
|
package/dist/express.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_REFRESH_COOKIE,
|
|
3
3
|
iqAuthMiddleware
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZESHDJDU.mjs";
|
|
5
5
|
import {
|
|
6
6
|
handleCallback,
|
|
7
7
|
handleRefresh,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-5WFR6Y33.mjs";
|
|
13
13
|
import {
|
|
14
14
|
IQAuthClient
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MDUHPQMM.mjs";
|
|
16
16
|
import {
|
|
17
17
|
ErrorCodes,
|
|
18
18
|
IQAuthError
|
package/dist/fastify.d.mts
CHANGED
|
@@ -17,6 +17,12 @@ interface IQAuthFastifyOptions extends IQAuthHelperConfig {
|
|
|
17
17
|
mountHelperRoutes?: boolean;
|
|
18
18
|
/** Routes that bypass verification (e.g. health checks). */
|
|
19
19
|
publicPaths?: string[] | ((path: string) => boolean);
|
|
20
|
+
/** Override token verification options (issuer / audience / clock tolerance). */
|
|
21
|
+
verify?: {
|
|
22
|
+
issuer?: string | string[];
|
|
23
|
+
audience?: string | string[];
|
|
24
|
+
clockTolerance?: number;
|
|
25
|
+
};
|
|
20
26
|
}
|
|
21
27
|
declare function iqAuth(fastify: any, options: IQAuthFastifyOptions): Promise<void>;
|
|
22
28
|
|
package/dist/fastify.d.ts
CHANGED
|
@@ -17,6 +17,12 @@ interface IQAuthFastifyOptions extends IQAuthHelperConfig {
|
|
|
17
17
|
mountHelperRoutes?: boolean;
|
|
18
18
|
/** Routes that bypass verification (e.g. health checks). */
|
|
19
19
|
publicPaths?: string[] | ((path: string) => boolean);
|
|
20
|
+
/** Override token verification options (issuer / audience / clock tolerance). */
|
|
21
|
+
verify?: {
|
|
22
|
+
issuer?: string | string[];
|
|
23
|
+
audience?: string | string[];
|
|
24
|
+
clockTolerance?: number;
|
|
25
|
+
};
|
|
20
26
|
}
|
|
21
27
|
declare function iqAuth(fastify: any, options: IQAuthFastifyOptions): Promise<void>;
|
|
22
28
|
|
package/dist/fastify.js
CHANGED
|
@@ -410,7 +410,10 @@ function parseMfaResponse(data, browserSessionMode) {
|
|
|
410
410
|
var import_crypto = __toESM(require("crypto"));
|
|
411
411
|
var import_jsonwebtoken = __toESM(require("jsonwebtoken"));
|
|
412
412
|
var JWKS_CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
413
|
-
var DEFAULT_TOKEN_ISSUER =
|
|
413
|
+
var DEFAULT_TOKEN_ISSUER = [
|
|
414
|
+
"https://auth.dispositioniq.com",
|
|
415
|
+
"auth.dispositioniq.com"
|
|
416
|
+
];
|
|
414
417
|
var DEFAULT_TOKEN_AUDIENCE = [
|
|
415
418
|
"dispositioniq",
|
|
416
419
|
"iqcapture",
|
|
@@ -2024,7 +2027,16 @@ async function iqAuth(fastify, options) {
|
|
|
2024
2027
|
if (!parsed) throw new Error("@iqauth/sdk/fastify: invalid publishable key");
|
|
2025
2028
|
const issuer = (options.issuer ?? (parsed.iss.startsWith("http") ? parsed.iss : `https://${parsed.iss}`)).replace(/\/+$/, "");
|
|
2026
2029
|
const helperConfig = { ...options, issuer };
|
|
2027
|
-
const client = new IQAuthClient({
|
|
2030
|
+
const client = new IQAuthClient({
|
|
2031
|
+
baseUrl: issuer,
|
|
2032
|
+
environment: "server",
|
|
2033
|
+
verify: options.verify
|
|
2034
|
+
});
|
|
2035
|
+
const perCallVerify = options.verify ? {
|
|
2036
|
+
issuer: options.verify.issuer,
|
|
2037
|
+
audience: options.verify.audience,
|
|
2038
|
+
clockTolerance: options.verify.clockTolerance
|
|
2039
|
+
} : void 0;
|
|
2028
2040
|
const accessCookie = options.accessCookieName ?? "iqauth_at";
|
|
2029
2041
|
const refreshCookie = options.refreshCookieName ?? "iqauth_rt";
|
|
2030
2042
|
const mount = (options.mountPath ?? "/api/iqauth").replace(/\/+$/, "");
|
|
@@ -2047,7 +2059,7 @@ async function iqAuth(fastify, options) {
|
|
|
2047
2059
|
return reply;
|
|
2048
2060
|
}
|
|
2049
2061
|
try {
|
|
2050
|
-
req.auth = await client.tokens.verify(token);
|
|
2062
|
+
req.auth = await client.tokens.verify(token, perCallVerify);
|
|
2051
2063
|
} catch (err) {
|
|
2052
2064
|
if (err instanceof IQAuthError && KNOWN_AUTH_ERRORS.has(err.code)) {
|
|
2053
2065
|
reply.code(401).send({ success: false, error: { code: err.code, message: err.message } });
|
|
@@ -2079,6 +2091,12 @@ async function iqAuth(fastify, options) {
|
|
|
2079
2091
|
}
|
|
2080
2092
|
fastify.decorate("iqauth", { client, issuer });
|
|
2081
2093
|
}
|
|
2094
|
+
iqAuth[/* @__PURE__ */ Symbol.for("skip-override")] = true;
|
|
2095
|
+
iqAuth[/* @__PURE__ */ Symbol.for("fastify.display-name")] = "@iqauth/sdk/fastify";
|
|
2096
|
+
iqAuth[/* @__PURE__ */ Symbol.for("plugin-meta")] = {
|
|
2097
|
+
name: "@iqauth/sdk/fastify",
|
|
2098
|
+
fastify: ">=4.0.0"
|
|
2099
|
+
};
|
|
2082
2100
|
var fastify_default = iqAuth;
|
|
2083
2101
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2084
2102
|
0 && (module.exports = {
|
package/dist/fastify.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-5WFR6Y33.mjs";
|
|
10
10
|
import {
|
|
11
11
|
IQAuthClient
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MDUHPQMM.mjs";
|
|
13
13
|
import {
|
|
14
14
|
IQAuthError
|
|
15
15
|
} from "./chunk-6I6RM4MN.mjs";
|
|
@@ -56,7 +56,16 @@ async function iqAuth(fastify, options) {
|
|
|
56
56
|
if (!parsed) throw new Error("@iqauth/sdk/fastify: invalid publishable key");
|
|
57
57
|
const issuer = (options.issuer ?? (parsed.iss.startsWith("http") ? parsed.iss : `https://${parsed.iss}`)).replace(/\/+$/, "");
|
|
58
58
|
const helperConfig = { ...options, issuer };
|
|
59
|
-
const client = new IQAuthClient({
|
|
59
|
+
const client = new IQAuthClient({
|
|
60
|
+
baseUrl: issuer,
|
|
61
|
+
environment: "server",
|
|
62
|
+
verify: options.verify
|
|
63
|
+
});
|
|
64
|
+
const perCallVerify = options.verify ? {
|
|
65
|
+
issuer: options.verify.issuer,
|
|
66
|
+
audience: options.verify.audience,
|
|
67
|
+
clockTolerance: options.verify.clockTolerance
|
|
68
|
+
} : void 0;
|
|
60
69
|
const accessCookie = options.accessCookieName ?? "iqauth_at";
|
|
61
70
|
const refreshCookie = options.refreshCookieName ?? "iqauth_rt";
|
|
62
71
|
const mount = (options.mountPath ?? "/api/iqauth").replace(/\/+$/, "");
|
|
@@ -79,7 +88,7 @@ async function iqAuth(fastify, options) {
|
|
|
79
88
|
return reply;
|
|
80
89
|
}
|
|
81
90
|
try {
|
|
82
|
-
req.auth = await client.tokens.verify(token);
|
|
91
|
+
req.auth = await client.tokens.verify(token, perCallVerify);
|
|
83
92
|
} catch (err) {
|
|
84
93
|
if (err instanceof IQAuthError && KNOWN_AUTH_ERRORS.has(err.code)) {
|
|
85
94
|
reply.code(401).send({ success: false, error: { code: err.code, message: err.message } });
|
|
@@ -111,6 +120,12 @@ async function iqAuth(fastify, options) {
|
|
|
111
120
|
}
|
|
112
121
|
fastify.decorate("iqauth", { client, issuer });
|
|
113
122
|
}
|
|
123
|
+
iqAuth[/* @__PURE__ */ Symbol.for("skip-override")] = true;
|
|
124
|
+
iqAuth[/* @__PURE__ */ Symbol.for("fastify.display-name")] = "@iqauth/sdk/fastify";
|
|
125
|
+
iqAuth[/* @__PURE__ */ Symbol.for("plugin-meta")] = {
|
|
126
|
+
name: "@iqauth/sdk/fastify",
|
|
127
|
+
fastify: ">=4.0.0"
|
|
128
|
+
};
|
|
114
129
|
var fastify_default = iqAuth;
|
|
115
130
|
export {
|
|
116
131
|
fastify_default as default,
|
package/dist/hono.js
CHANGED
|
@@ -409,7 +409,10 @@ function parseMfaResponse(data, browserSessionMode) {
|
|
|
409
409
|
var import_crypto = __toESM(require("crypto"));
|
|
410
410
|
var import_jsonwebtoken = __toESM(require("jsonwebtoken"));
|
|
411
411
|
var JWKS_CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
412
|
-
var DEFAULT_TOKEN_ISSUER =
|
|
412
|
+
var DEFAULT_TOKEN_ISSUER = [
|
|
413
|
+
"https://auth.dispositioniq.com",
|
|
414
|
+
"auth.dispositioniq.com"
|
|
415
|
+
];
|
|
413
416
|
var DEFAULT_TOKEN_AUDIENCE = [
|
|
414
417
|
"dispositioniq",
|
|
415
418
|
"iqcapture",
|
package/dist/hono.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { o as ApiKeysModule, l as AppsModule, A as AuthModule, B as BrandingModule, r as ClientsModule, C as CreateAppRequest, m as CreateAppResponse, h as DEFAULT_CLOCK_TOLERANCE_SECONDS, g as DEFAULT_TOKEN_AUDIENCE, D as DEFAULT_TOKEN_ISSUER, E as EntitlementsModule, G as GdprModule, H as HierarchyModule, I as IQAuthClient, a as InMemoryOidcStateStore, p as InvitesModule, M as MembershipsModule, u as MfaModule, d as OidcAuthRequest, e as OidcCallbackResult, O as OidcModule, f as OidcModuleOptions, b as OidcStateStore, c as OidcStoredRequest, n as PermissionGroupsModule, P as PermissionsModule, t as PinModule, R as RolesModule, s as ScopeModule, S as SessionsModule, q as SourcesModule, k as TenantsModule, i as TokenVerifyOptions, T as TokensModule, j as TokensModuleOptions, U as UsersModule, V as VendorsModule, W as WebhooksModule } from './client-
|
|
1
|
+
export { o as ApiKeysModule, l as AppsModule, A as AuthModule, B as BrandingModule, r as ClientsModule, C as CreateAppRequest, m as CreateAppResponse, h as DEFAULT_CLOCK_TOLERANCE_SECONDS, g as DEFAULT_TOKEN_AUDIENCE, D as DEFAULT_TOKEN_ISSUER, E as EntitlementsModule, G as GdprModule, H as HierarchyModule, I as IQAuthClient, a as InMemoryOidcStateStore, p as InvitesModule, M as MembershipsModule, u as MfaModule, d as OidcAuthRequest, e as OidcCallbackResult, O as OidcModule, f as OidcModuleOptions, b as OidcStateStore, c as OidcStoredRequest, n as PermissionGroupsModule, P as PermissionsModule, t as PinModule, R as RolesModule, s as ScopeModule, S as SessionsModule, q as SourcesModule, k as TenantsModule, i as TokenVerifyOptions, T as TokensModule, j as TokensModuleOptions, U as UsersModule, V as VendorsModule, W as WebhooksModule } from './client-Dv4v92Mj.mjs';
|
|
2
2
|
export { a as ErrorCode, E as ErrorCodes, I as IQAuthError } from './errors-CDdl24MP.mjs';
|
|
3
|
-
export { i as iqAuthMiddleware } from './express-
|
|
3
|
+
export { i as iqAuthMiddleware } from './express-BZmF1llh.mjs';
|
|
4
4
|
export { K as KeyMode, b as ParsedPublishableKey, P as PublishableKeyPayload, e as encodePublishableKey, i as isPublishableKey, a as isSecretKey, p as parsePublishableKey } from './publishableKey-B5DIK81A.mjs';
|
|
5
5
|
export { an as AcceptInviteRequest, aa as AddGroupPermissionRequest, ad as AddUserOverrideRequest, v as ApiErrorResponse, ag as ApiKeyInfo, aj as ApiKeyIntrospection, w as ApiResponse, A as ApiSuccessResponse, _ as AppInfo, Z as AppManifest, a0 as AppSyncResult, a4 as AssignRoleRequest, aM as AvailableScopesTree, a_ as BackupCodeCountResult, aZ as BackupCodesResult, p as BrandingAsset, B as BrandingConfig, r as BrandingDomainMapping, aB as Client, ah as CreateApiKeyRequest, ai as CreateApiKeyResult, aC as CreateClientRequest, al as CreateInviteRequest, aJ as CreateMembershipRequest, a2 as CreateRoleRequest, az as CreateSourceRequest, C as CreateTenantRequest, aw as CreateVendorRequest, ap as CreateWebhookRequest, aq as CreateWebhookResult, ae as EffectivePermission, aY as EmailEnrollResult, at as Entitlement, N as ExpressMiddlewareOptions, aR as GdprExportData, au as GrantEntitlementRequest, a9 as GroupPermission, aG as HierarchyClient, aH as HierarchyLink, aF as HierarchySource, aE as HierarchyVendor, c as IQAuthBrowserSessionClientConfig, a as IQAuthClientConfig, I as IQAuthEnvironment, V as IQAuthNextFunction, Q as IQAuthRequestLike, R as IQAuthResponseLike, W as IQAuthRetryConfig, b as IQAuthTokenClientConfig, X as IQAuthVerifyConfig, ab as InheritanceRelation, ak as Invitation, l as InviteTenantUserRequest, m as InviteTenantUserResult, am as InviteValidation, s as JwksKey, t as JwksResponse, J as JwtClaims, L as LoginResult, aI as Membership, aL as MembershipWithDetails, aU as MfaAvailableMethods, y as MfaEnrollment, x as MfaMethod, F as MfaPolicy, D as MfaVerifyResult, M as MigrateUserRequest, O as OidcDiscovery, u as OidcTokenResponse, E as PasswordPolicy, af as PermissionCheckResult, a8 as PermissionGroup, $ as PermissionNodeInfo, Y as PermissionNodeManifest, aT as PinLoginResult, aS as PinStatus, P as PromoteToVendorRequest, k as PromoteToVendorResult, H as ProvisionUserRequest, K as ProvisionUserResponse, a1 as Role, S as ScopeContext, aQ as ScopeSwitchResult, aN as ScopeTreeClient, aO as ScopeTreeSource, aP as ScopeTreeVendor, h as Session, g as SessionAuthenticatedLoginResult, d as SessionUser, aX as SmsEnrollResult, ay as Source, e as Tenant, i as TenantInfo, a7 as TenantUser, n as TenantUserRoleUpdate, f as TokenAuthenticatedLoginResult, T as TokenPair, aV as TotpEnrollResult, z as TotpEnrollmentResult, aW as TotpVerifyResult, o as UpdateBrandingRequest, aD as UpdateClientRequest, aK as UpdateMembershipRequest, a3 as UpdateRoleRequest, aA as UpdateSourceRequest, j as UpdateTenantRequest, ax as UpdateVendorRequest, q as UploadAssetRequest, a6 as UserGroupAssignment, ac as UserPermissionOverride, G as UserPermissions, U as UserProfile, a5 as UserRoleAssignment, av as Vendor, ar as WebhookDelivery, ao as WebhookEndpoint, as as WebhookTestResult } from './types-Cxl3bQHt.mjs';
|
|
6
6
|
import 'jsonwebtoken';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { o as ApiKeysModule, l as AppsModule, A as AuthModule, B as BrandingModule, r as ClientsModule, C as CreateAppRequest, m as CreateAppResponse, h as DEFAULT_CLOCK_TOLERANCE_SECONDS, g as DEFAULT_TOKEN_AUDIENCE, D as DEFAULT_TOKEN_ISSUER, E as EntitlementsModule, G as GdprModule, H as HierarchyModule, I as IQAuthClient, a as InMemoryOidcStateStore, p as InvitesModule, M as MembershipsModule, u as MfaModule, d as OidcAuthRequest, e as OidcCallbackResult, O as OidcModule, f as OidcModuleOptions, b as OidcStateStore, c as OidcStoredRequest, n as PermissionGroupsModule, P as PermissionsModule, t as PinModule, R as RolesModule, s as ScopeModule, S as SessionsModule, q as SourcesModule, k as TenantsModule, i as TokenVerifyOptions, T as TokensModule, j as TokensModuleOptions, U as UsersModule, V as VendorsModule, W as WebhooksModule } from './client-
|
|
1
|
+
export { o as ApiKeysModule, l as AppsModule, A as AuthModule, B as BrandingModule, r as ClientsModule, C as CreateAppRequest, m as CreateAppResponse, h as DEFAULT_CLOCK_TOLERANCE_SECONDS, g as DEFAULT_TOKEN_AUDIENCE, D as DEFAULT_TOKEN_ISSUER, E as EntitlementsModule, G as GdprModule, H as HierarchyModule, I as IQAuthClient, a as InMemoryOidcStateStore, p as InvitesModule, M as MembershipsModule, u as MfaModule, d as OidcAuthRequest, e as OidcCallbackResult, O as OidcModule, f as OidcModuleOptions, b as OidcStateStore, c as OidcStoredRequest, n as PermissionGroupsModule, P as PermissionsModule, t as PinModule, R as RolesModule, s as ScopeModule, S as SessionsModule, q as SourcesModule, k as TenantsModule, i as TokenVerifyOptions, T as TokensModule, j as TokensModuleOptions, U as UsersModule, V as VendorsModule, W as WebhooksModule } from './client-DXbHb2ul.js';
|
|
2
2
|
export { a as ErrorCode, E as ErrorCodes, I as IQAuthError } from './errors-CDdl24MP.js';
|
|
3
|
-
export { i as iqAuthMiddleware } from './express-
|
|
3
|
+
export { i as iqAuthMiddleware } from './express-B4o3P8vK.js';
|
|
4
4
|
export { K as KeyMode, b as ParsedPublishableKey, P as PublishableKeyPayload, e as encodePublishableKey, i as isPublishableKey, a as isSecretKey, p as parsePublishableKey } from './publishableKey-B5DIK81A.js';
|
|
5
5
|
export { an as AcceptInviteRequest, aa as AddGroupPermissionRequest, ad as AddUserOverrideRequest, v as ApiErrorResponse, ag as ApiKeyInfo, aj as ApiKeyIntrospection, w as ApiResponse, A as ApiSuccessResponse, _ as AppInfo, Z as AppManifest, a0 as AppSyncResult, a4 as AssignRoleRequest, aM as AvailableScopesTree, a_ as BackupCodeCountResult, aZ as BackupCodesResult, p as BrandingAsset, B as BrandingConfig, r as BrandingDomainMapping, aB as Client, ah as CreateApiKeyRequest, ai as CreateApiKeyResult, aC as CreateClientRequest, al as CreateInviteRequest, aJ as CreateMembershipRequest, a2 as CreateRoleRequest, az as CreateSourceRequest, C as CreateTenantRequest, aw as CreateVendorRequest, ap as CreateWebhookRequest, aq as CreateWebhookResult, ae as EffectivePermission, aY as EmailEnrollResult, at as Entitlement, N as ExpressMiddlewareOptions, aR as GdprExportData, au as GrantEntitlementRequest, a9 as GroupPermission, aG as HierarchyClient, aH as HierarchyLink, aF as HierarchySource, aE as HierarchyVendor, c as IQAuthBrowserSessionClientConfig, a as IQAuthClientConfig, I as IQAuthEnvironment, V as IQAuthNextFunction, Q as IQAuthRequestLike, R as IQAuthResponseLike, W as IQAuthRetryConfig, b as IQAuthTokenClientConfig, X as IQAuthVerifyConfig, ab as InheritanceRelation, ak as Invitation, l as InviteTenantUserRequest, m as InviteTenantUserResult, am as InviteValidation, s as JwksKey, t as JwksResponse, J as JwtClaims, L as LoginResult, aI as Membership, aL as MembershipWithDetails, aU as MfaAvailableMethods, y as MfaEnrollment, x as MfaMethod, F as MfaPolicy, D as MfaVerifyResult, M as MigrateUserRequest, O as OidcDiscovery, u as OidcTokenResponse, E as PasswordPolicy, af as PermissionCheckResult, a8 as PermissionGroup, $ as PermissionNodeInfo, Y as PermissionNodeManifest, aT as PinLoginResult, aS as PinStatus, P as PromoteToVendorRequest, k as PromoteToVendorResult, H as ProvisionUserRequest, K as ProvisionUserResponse, a1 as Role, S as ScopeContext, aQ as ScopeSwitchResult, aN as ScopeTreeClient, aO as ScopeTreeSource, aP as ScopeTreeVendor, h as Session, g as SessionAuthenticatedLoginResult, d as SessionUser, aX as SmsEnrollResult, ay as Source, e as Tenant, i as TenantInfo, a7 as TenantUser, n as TenantUserRoleUpdate, f as TokenAuthenticatedLoginResult, T as TokenPair, aV as TotpEnrollResult, z as TotpEnrollmentResult, aW as TotpVerifyResult, o as UpdateBrandingRequest, aD as UpdateClientRequest, aK as UpdateMembershipRequest, a3 as UpdateRoleRequest, aA as UpdateSourceRequest, j as UpdateTenantRequest, ax as UpdateVendorRequest, q as UploadAssetRequest, a6 as UserGroupAssignment, ac as UserPermissionOverride, G as UserPermissions, U as UserProfile, a5 as UserRoleAssignment, av as Vendor, ar as WebhookDelivery, ao as WebhookEndpoint, as as WebhookTestResult } from './types-Cxl3bQHt.js';
|
|
6
6
|
import 'jsonwebtoken';
|
package/dist/index.js
CHANGED
|
@@ -480,7 +480,10 @@ function parseMfaResponse(data, browserSessionMode) {
|
|
|
480
480
|
var import_crypto = __toESM(require("crypto"));
|
|
481
481
|
var import_jsonwebtoken = __toESM(require("jsonwebtoken"));
|
|
482
482
|
var JWKS_CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
483
|
-
var DEFAULT_TOKEN_ISSUER =
|
|
483
|
+
var DEFAULT_TOKEN_ISSUER = [
|
|
484
|
+
"https://auth.dispositioniq.com",
|
|
485
|
+
"auth.dispositioniq.com"
|
|
486
|
+
];
|
|
484
487
|
var DEFAULT_TOKEN_AUDIENCE = [
|
|
485
488
|
"dispositioniq",
|
|
486
489
|
"iqcapture",
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
iqAuthMiddleware
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZESHDJDU.mjs";
|
|
4
4
|
import {
|
|
5
5
|
encodePublishableKey,
|
|
6
6
|
isPublishableKey,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
UsersModule,
|
|
38
38
|
VendorsModule,
|
|
39
39
|
WebhooksModule
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-MDUHPQMM.mjs";
|
|
41
41
|
import {
|
|
42
42
|
ErrorCodes,
|
|
43
43
|
IQAuthError
|
package/dist/mobile.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IQAuthClient } from './client-
|
|
1
|
+
import { I as IQAuthClient } from './client-Dv4v92Mj.mjs';
|
|
2
2
|
import { b as IQAuthTokenClientConfig } from './types-Cxl3bQHt.mjs';
|
|
3
3
|
export { E as ErrorCodes, I as IQAuthError } from './errors-CDdl24MP.mjs';
|
|
4
4
|
import 'jsonwebtoken';
|
package/dist/mobile.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IQAuthClient } from './client-
|
|
1
|
+
import { I as IQAuthClient } from './client-DXbHb2ul.js';
|
|
2
2
|
import { b as IQAuthTokenClientConfig } from './types-Cxl3bQHt.js';
|
|
3
3
|
export { E as ErrorCodes, I as IQAuthError } from './errors-CDdl24MP.js';
|
|
4
4
|
import 'jsonwebtoken';
|
package/dist/mobile.js
CHANGED
|
@@ -449,7 +449,10 @@ function parseMfaResponse(data, browserSessionMode) {
|
|
|
449
449
|
var import_crypto = __toESM(require("crypto"));
|
|
450
450
|
var import_jsonwebtoken = __toESM(require("jsonwebtoken"));
|
|
451
451
|
var JWKS_CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
452
|
-
var DEFAULT_TOKEN_ISSUER =
|
|
452
|
+
var DEFAULT_TOKEN_ISSUER = [
|
|
453
|
+
"https://auth.dispositioniq.com",
|
|
454
|
+
"auth.dispositioniq.com"
|
|
455
|
+
];
|
|
453
456
|
var DEFAULT_TOKEN_AUDIENCE = [
|
|
454
457
|
"dispositioniq",
|
|
455
458
|
"iqcapture",
|
package/dist/mobile.mjs
CHANGED
package/dist/next.js
CHANGED
|
@@ -643,7 +643,10 @@ function parseMfaResponse(data, browserSessionMode) {
|
|
|
643
643
|
var import_crypto = __toESM(require("crypto"));
|
|
644
644
|
var import_jsonwebtoken = __toESM(require("jsonwebtoken"));
|
|
645
645
|
var JWKS_CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
646
|
-
var DEFAULT_TOKEN_ISSUER =
|
|
646
|
+
var DEFAULT_TOKEN_ISSUER = [
|
|
647
|
+
"https://auth.dispositioniq.com",
|
|
648
|
+
"auth.dispositioniq.com"
|
|
649
|
+
];
|
|
647
650
|
var DEFAULT_TOKEN_AUDIENCE = [
|
|
648
651
|
"dispositioniq",
|
|
649
652
|
"iqcapture",
|
package/dist/next.mjs
CHANGED
package/dist/react.d.mts
CHANGED
|
@@ -122,6 +122,9 @@ declare function AuthCallback({ onComplete, fallback }?: AuthCallbackProps): Rea
|
|
|
122
122
|
interface IQAuthBranding {
|
|
123
123
|
brandName: string | null;
|
|
124
124
|
logoUrl: string | null;
|
|
125
|
+
logoLightUrl?: string | null;
|
|
126
|
+
logoDarkUrl?: string | null;
|
|
127
|
+
faviconUrl?: string | null;
|
|
125
128
|
loginHeadline: string | null;
|
|
126
129
|
loginSubheadline: string | null;
|
|
127
130
|
primaryColor: string | null;
|
|
@@ -129,10 +132,31 @@ interface IQAuthBranding {
|
|
|
129
132
|
backgroundColor: string | null;
|
|
130
133
|
surfaceColor: string | null;
|
|
131
134
|
textColor: string | null;
|
|
135
|
+
heroImageUrl?: string | null;
|
|
136
|
+
/** Optional full-bleed background image for the `full_bleed` layout. */
|
|
137
|
+
backgroundImageUrl?: string | null;
|
|
138
|
+
tagline?: string | null;
|
|
139
|
+
loginSideCopy?: string | null;
|
|
140
|
+
googleButtonLabel?: string | null;
|
|
141
|
+
customCss?: string | null;
|
|
142
|
+
/** "centered_card" | "split_screen" | "full_bleed" */
|
|
143
|
+
loginLayout?: string | null;
|
|
144
|
+
/** "solid" | "outline" | "ghost" */
|
|
145
|
+
socialButtonStyle?: string | null;
|
|
146
|
+
fontFamilyBody?: string | null;
|
|
147
|
+
fontFamilyHeading?: string | null;
|
|
148
|
+
customFontUrl?: string | null;
|
|
149
|
+
borderRadius?: number | string | null;
|
|
150
|
+
footerText?: string | null;
|
|
151
|
+
emailHeaderImageUrl?: string | null;
|
|
152
|
+
emailSenderName?: string | null;
|
|
153
|
+
emailFooter?: string | null;
|
|
132
154
|
supportEmail?: string | null;
|
|
133
155
|
supportUrl?: string | null;
|
|
134
156
|
termsUrl?: string | null;
|
|
135
157
|
privacyUrl?: string | null;
|
|
158
|
+
/** Composite revision (`${tenantRev}.${appRev}`) for cache-busting. */
|
|
159
|
+
brandingRev?: string | null;
|
|
136
160
|
}
|
|
137
161
|
interface IQAuthSignInContext {
|
|
138
162
|
app: {
|
|
@@ -149,6 +173,13 @@ interface IQAuthSignInContext {
|
|
|
149
173
|
allowedOrigins: string[];
|
|
150
174
|
returnAllowed: boolean;
|
|
151
175
|
branding: IQAuthBranding | null;
|
|
176
|
+
brandingRev?: string | null;
|
|
177
|
+
session?: {
|
|
178
|
+
userId: string;
|
|
179
|
+
email: string;
|
|
180
|
+
name: string;
|
|
181
|
+
authenticatedAt: number;
|
|
182
|
+
} | null;
|
|
152
183
|
}
|
|
153
184
|
interface SharedComponentProps {
|
|
154
185
|
/** Base URL of the IQAuth service (e.g. https://auth.dispositioniq.com). */
|
|
@@ -166,13 +197,44 @@ declare function useIQAuthSignInContext(iqAuthBaseUrl: string, appKey: string, r
|
|
|
166
197
|
loading: boolean;
|
|
167
198
|
error: string | null;
|
|
168
199
|
};
|
|
200
|
+
declare function sanitizeBrandCss(input: string | null | undefined): string;
|
|
201
|
+
/**
|
|
202
|
+
* Fetches the layered tenant/app branding for use by chrome-only SDK
|
|
203
|
+
* components (`<UserButton/>`, `<UserProfile/>`, `<OrganizationSwitcher/>`)
|
|
204
|
+
* that don't go through `<SignIn/>`'s sign-in-context.
|
|
205
|
+
*
|
|
206
|
+
* Cached at module scope for 60s, keyed by URL. The cache is also
|
|
207
|
+
* brandingRev-aware: a newer rev for the same URL replaces older entries
|
|
208
|
+
* even within the TTL window. Returns `null` until first resolution; callers
|
|
209
|
+
* should treat that as "use neutral defaults".
|
|
210
|
+
*
|
|
211
|
+
* Reads `appId` from the IQAuthProvider's session manager (parsed from the
|
|
212
|
+
* publishable key) so per-app branding overrides are layered. Callers may
|
|
213
|
+
* override with the explicit `appId` parameter.
|
|
214
|
+
*/
|
|
215
|
+
declare function useResolvedSdkBranding(iqAuthBaseUrl: string, appId?: string | null): IQAuthBranding | null;
|
|
169
216
|
interface SignInProps extends SharedComponentProps {
|
|
170
217
|
/** URL the IQAuth backend should redirect back to with `?code=...`. Must be in the app's allowed_origins. */
|
|
171
218
|
returnTo: string;
|
|
172
219
|
/** Called after successful redirect. By default, `window.location.href = url`. */
|
|
173
220
|
onRedirect?: (url: string) => void;
|
|
221
|
+
/** Pass `"login"` to force the form to render even when an SSO session is active. */
|
|
222
|
+
prompt?: "login";
|
|
174
223
|
}
|
|
175
|
-
|
|
224
|
+
/**
|
|
225
|
+
* Pure render-decision helper. When this returns `true`, `<SignIn/>` MUST
|
|
226
|
+
* render the silent SSO placeholder instead of the email/password form,
|
|
227
|
+
* even on the very first render before `useEffect` fires. Exported so that
|
|
228
|
+
* smoke tests can verify the no-flash guarantee without standing up a DOM.
|
|
229
|
+
*/
|
|
230
|
+
declare function isSilentSsoEligible(ctx: {
|
|
231
|
+
session?: unknown;
|
|
232
|
+
app: {
|
|
233
|
+
defaultClientId: string | null;
|
|
234
|
+
};
|
|
235
|
+
returnAllowed: boolean;
|
|
236
|
+
} | null | undefined, effectivePrompt: "login" | undefined): boolean;
|
|
237
|
+
declare function SignIn({ iqAuthBaseUrl, appKey, returnTo, onRedirect, className, prompt }: SignInProps): react_jsx_runtime.JSX.Element;
|
|
176
238
|
interface SignUpProps extends SharedComponentProps {
|
|
177
239
|
returnTo?: string;
|
|
178
240
|
onSuccess?: () => void;
|
|
@@ -206,4 +268,4 @@ interface OrganizationSwitcherProps {
|
|
|
206
268
|
declare function OrganizationSwitcher({ iqAuthBaseUrl, onSwitched, className }: OrganizationSwitcherProps): react_jsx_runtime.JSX.Element;
|
|
207
269
|
declare const __version__ = "phase-bc-1.0.0";
|
|
208
270
|
|
|
209
|
-
export { AuthCallback, type AuthCallbackProps, type IQAuthBranding, IQAuthProvider, type IQAuthProviderProps, type IQAuthSignInContext, OrganizationSwitcher, type OrganizationSwitcherProps, RedirectToSignIn, type RedirectToSignInProps, type SessionError, type SharedComponentProps, SignIn, type SignInProps, SignUp, type SignUpProps, SignedIn, SignedOut, type UseAuthResult, type UseOrganizationResult, type UseSessionResult, type UseUserResult, UserButton, type UserButtonProps, UserProfile, type UserProfileProps, type UserSummary, __version__, useAuth, useAuthFetch, useIQAuthSignInContext, useOrganization, useSession, useUser };
|
|
271
|
+
export { AuthCallback, type AuthCallbackProps, type IQAuthBranding, IQAuthProvider, type IQAuthProviderProps, type IQAuthSignInContext, OrganizationSwitcher, type OrganizationSwitcherProps, RedirectToSignIn, type RedirectToSignInProps, type SessionError, type SharedComponentProps, SignIn, type SignInProps, SignUp, type SignUpProps, SignedIn, SignedOut, type UseAuthResult, type UseOrganizationResult, type UseSessionResult, type UseUserResult, UserButton, type UserButtonProps, UserProfile, type UserProfileProps, type UserSummary, __version__, isSilentSsoEligible, sanitizeBrandCss, useAuth, useAuthFetch, useIQAuthSignInContext, useOrganization, useResolvedSdkBranding, useSession, useUser };
|