@feelflow/ffid-sdk 5.12.0 → 5.13.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/{chunk-AOJDV3UO.cjs → chunk-JFFRO2Q5.cjs} +221 -9
- package/dist/{chunk-KB2JG64Z.js → chunk-RATTQIKM.js} +218 -10
- package/dist/components/index.cjs +8 -8
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{ffid-client-5IprSUVR.d.ts → ffid-client-BG0Qr86U.d.ts} +59 -29
- package/dist/{ffid-client-Dx4oc4Cw.d.cts → ffid-client-C3K3sAqq.d.cts} +59 -29
- package/dist/{index-DqsWKU16.d.cts → index-C6dnexXf.d.cts} +13 -0
- package/dist/{index-DqsWKU16.d.ts → index-C6dnexXf.d.ts} +13 -0
- package/dist/index.cjs +53 -37
- package/dist/index.d.cts +98 -4
- package/dist/index.d.ts +98 -4
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +67 -3
- package/dist/server/index.d.cts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +67 -3
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/dist/webhooks/index.cjs +5 -2
- package/dist/webhooks/index.js +5 -2
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { I as FFIDAnnouncementBadge, ai as FFIDAnnouncementBadgeClassNames, aj as FFIDAnnouncementBadgeProps, J as FFIDAnnouncementList, ak as FFIDAnnouncementListClassNames, al as FFIDAnnouncementListProps, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a1 as FFIDLoginButton, am as FFIDLoginButtonProps, a4 as FFIDOrganizationSwitcher, an as FFIDOrganizationSwitcherClassNames, ao as FFIDOrganizationSwitcherProps, a9 as FFIDSubscriptionBadge, ap as FFIDSubscriptionBadgeClassNames, aq as FFIDSubscriptionBadgeProps, ab as FFIDUserMenu, ar as FFIDUserMenuClassNames, as as FFIDUserMenuProps } from '../index-
|
|
1
|
+
export { I as FFIDAnnouncementBadge, ai as FFIDAnnouncementBadgeClassNames, aj as FFIDAnnouncementBadgeProps, J as FFIDAnnouncementList, ak as FFIDAnnouncementListClassNames, al as FFIDAnnouncementListProps, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a1 as FFIDLoginButton, am as FFIDLoginButtonProps, a4 as FFIDOrganizationSwitcher, an as FFIDOrganizationSwitcherClassNames, ao as FFIDOrganizationSwitcherProps, a9 as FFIDSubscriptionBadge, ap as FFIDSubscriptionBadgeClassNames, aq as FFIDSubscriptionBadgeProps, ab as FFIDUserMenu, ar as FFIDUserMenuClassNames, as as FFIDUserMenuProps } from '../index-C6dnexXf.cjs';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { I as FFIDAnnouncementBadge, ai as FFIDAnnouncementBadgeClassNames, aj as FFIDAnnouncementBadgeProps, J as FFIDAnnouncementList, ak as FFIDAnnouncementListClassNames, al as FFIDAnnouncementListProps, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a1 as FFIDLoginButton, am as FFIDLoginButtonProps, a4 as FFIDOrganizationSwitcher, an as FFIDOrganizationSwitcherClassNames, ao as FFIDOrganizationSwitcherProps, a9 as FFIDSubscriptionBadge, ap as FFIDSubscriptionBadgeClassNames, aq as FFIDSubscriptionBadgeProps, ab as FFIDUserMenu, ar as FFIDUserMenuClassNames, as as FFIDUserMenuProps } from '../index-
|
|
1
|
+
export { I as FFIDAnnouncementBadge, ai as FFIDAnnouncementBadgeClassNames, aj as FFIDAnnouncementBadgeProps, J as FFIDAnnouncementList, ak as FFIDAnnouncementListClassNames, al as FFIDAnnouncementListProps, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a1 as FFIDLoginButton, am as FFIDLoginButtonProps, a4 as FFIDOrganizationSwitcher, an as FFIDOrganizationSwitcherClassNames, ao as FFIDOrganizationSwitcherProps, a9 as FFIDSubscriptionBadge, ap as FFIDSubscriptionBadgeClassNames, aq as FFIDSubscriptionBadgeProps, ab as FFIDUserMenu, ar as FFIDUserMenuClassNames, as as FFIDUserMenuProps } from '../index-C6dnexXf.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-
|
|
1
|
+
export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-RATTQIKM.js';
|
|
@@ -955,6 +955,17 @@ interface FFIDOAuthUserInfoSubscription {
|
|
|
955
955
|
interface FFIDOAuthUserInfo {
|
|
956
956
|
sub: string;
|
|
957
957
|
email: string | null;
|
|
958
|
+
/**
|
|
959
|
+
* Whether the user's email is verified on the FFID side (#3791). Use this to
|
|
960
|
+
* safely gate email-based auto account-linking (account-takeover prevention):
|
|
961
|
+
* never auto-link on an unverified email.
|
|
962
|
+
*
|
|
963
|
+
* `undefined` means the FFID server predates the field (older deployment) or
|
|
964
|
+
* the verification path could not populate it — NOT "unverified". Treat
|
|
965
|
+
* `undefined` as "unknown" and fall back to a stricter linking policy rather
|
|
966
|
+
* than coercing it to `false`/`true`.
|
|
967
|
+
*/
|
|
968
|
+
emailVerified?: boolean | undefined;
|
|
958
969
|
name: string | null;
|
|
959
970
|
picture: string | null;
|
|
960
971
|
companyName?: string | null | undefined;
|
|
@@ -1353,34 +1364,6 @@ interface ContractWizardSubscriptionOptions {
|
|
|
1353
1364
|
organizationId?: string;
|
|
1354
1365
|
}
|
|
1355
1366
|
|
|
1356
|
-
/** Redirect and URL generation - redirectToLogin / redirectToAuthorize / redirectToLogout / getLoginUrl / getSignupUrl / getLogoutUrl */
|
|
1357
|
-
|
|
1358
|
-
/**
|
|
1359
|
-
* `screen_hint=signup` query value for `/oauth/authorize` (#2908 / #2911).
|
|
1360
|
-
* Forwards to Supabase Auth signup screen; only the `'signup'` value is
|
|
1361
|
-
* propagated (no-op when `'login'` or omitted).
|
|
1362
|
-
*/
|
|
1363
|
-
declare const SCREEN_HINT_SIGNUP: "signup";
|
|
1364
|
-
/** Options for redirectToAuthorize */
|
|
1365
|
-
interface RedirectToAuthorizeOptions {
|
|
1366
|
-
/** Target organization ID — triggers org-scoped OAuth re-authorization */
|
|
1367
|
-
organizationId?: string;
|
|
1368
|
-
/**
|
|
1369
|
-
* Initial Supabase Auth screen hint (#2908 / #2911).
|
|
1370
|
-
*
|
|
1371
|
-
* - `'signup'`: forwards `?screen_hint=signup` so the FFID OAuth flow lands
|
|
1372
|
-
* on the signup screen (used by external services that want to deep-link
|
|
1373
|
-
* new users into the signup CTA).
|
|
1374
|
-
* - `'login'` / `undefined`: no `screen_hint` param is added — the default
|
|
1375
|
-
* login screen is shown.
|
|
1376
|
-
*
|
|
1377
|
-
* In cookie mode, `'signup'` redirects to the FFID `/signup` page instead
|
|
1378
|
-
* of `/login` so the SDK contract (signup-screen intent) stays consistent
|
|
1379
|
-
* regardless of `authMode`.
|
|
1380
|
-
*/
|
|
1381
|
-
screenHint?: typeof SCREEN_HINT_SIGNUP | 'login';
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
1367
|
/**
|
|
1385
1368
|
* Token Store
|
|
1386
1369
|
*
|
|
@@ -1422,6 +1405,53 @@ interface TokenStore {
|
|
|
1422
1405
|
*/
|
|
1423
1406
|
declare function createTokenStore(storageType?: 'localStorage' | 'memory'): TokenStore;
|
|
1424
1407
|
|
|
1408
|
+
/** OAuth token operations - exchangeCodeForTokens / refreshAccessToken / signOutToken */
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* Optional OAuth `state` validation for {@link exchangeCodeForTokens}.
|
|
1412
|
+
*
|
|
1413
|
+
* If a `state` is supplied on EITHER side — `expectedState` (the value persisted
|
|
1414
|
+
* at `redirectToAuthorize`) or `actualState` (the value returned on the callback
|
|
1415
|
+
* URL) — both must be present and equal before any token exchange. A mismatch
|
|
1416
|
+
* OR an omitted counterpart fails closed (no exchange) to defend against CSRF
|
|
1417
|
+
* (RFC 6749 §10.12 / #3841). Validation is skipped only when BOTH are omitted
|
|
1418
|
+
* (backward compatible — callers that don't opt in are unaffected).
|
|
1419
|
+
*/
|
|
1420
|
+
interface ExchangeCodeForTokensOptions {
|
|
1421
|
+
/** Stored state from `redirectToAuthorize` (e.g. `retrieveState()`) */
|
|
1422
|
+
expectedState?: string;
|
|
1423
|
+
/** State returned on the OAuth callback URL */
|
|
1424
|
+
actualState?: string;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
/** Redirect and URL generation - redirectToLogin / redirectToAuthorize / redirectToLogout / getLoginUrl / getSignupUrl / getLogoutUrl */
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* `screen_hint=signup` query value for `/oauth/authorize` (#2908 / #2911).
|
|
1431
|
+
* Forwards to Supabase Auth signup screen; only the `'signup'` value is
|
|
1432
|
+
* propagated (no-op when `'login'` or omitted).
|
|
1433
|
+
*/
|
|
1434
|
+
declare const SCREEN_HINT_SIGNUP: "signup";
|
|
1435
|
+
/** Options for redirectToAuthorize */
|
|
1436
|
+
interface RedirectToAuthorizeOptions {
|
|
1437
|
+
/** Target organization ID — triggers org-scoped OAuth re-authorization */
|
|
1438
|
+
organizationId?: string;
|
|
1439
|
+
/**
|
|
1440
|
+
* Initial Supabase Auth screen hint (#2908 / #2911).
|
|
1441
|
+
*
|
|
1442
|
+
* - `'signup'`: forwards `?screen_hint=signup` so the FFID OAuth flow lands
|
|
1443
|
+
* on the signup screen (used by external services that want to deep-link
|
|
1444
|
+
* new users into the signup CTA).
|
|
1445
|
+
* - `'login'` / `undefined`: no `screen_hint` param is added — the default
|
|
1446
|
+
* login screen is shown.
|
|
1447
|
+
*
|
|
1448
|
+
* In cookie mode, `'signup'` redirects to the FFID `/signup` page instead
|
|
1449
|
+
* of `/login` so the SDK contract (signup-screen intent) stays consistent
|
|
1450
|
+
* regardless of `authMode`.
|
|
1451
|
+
*/
|
|
1452
|
+
screenHint?: typeof SCREEN_HINT_SIGNUP | 'login';
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1425
1455
|
/** Creates an FFID API client instance */
|
|
1426
1456
|
declare function createFFIDClient(config: FFIDConfig): {
|
|
1427
1457
|
getSession: () => Promise<FFIDApiResponse<FFIDSessionResponse>>;
|
|
@@ -1433,7 +1463,7 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1433
1463
|
getLogoutUrl: (postLogoutRedirectUri?: string) => string;
|
|
1434
1464
|
getSignupUrl: (redirectUrl?: string) => string;
|
|
1435
1465
|
createError: (code: string, message: string) => FFIDError;
|
|
1436
|
-
exchangeCodeForTokens: (code: string, codeVerifier?: string) => Promise<FFIDApiResponse<void>>;
|
|
1466
|
+
exchangeCodeForTokens: (code: string, codeVerifier?: string, opts?: ExchangeCodeForTokensOptions) => Promise<FFIDApiResponse<void>>;
|
|
1437
1467
|
refreshAccessToken: () => Promise<FFIDApiResponse<void>>;
|
|
1438
1468
|
checkSubscription: (params: {
|
|
1439
1469
|
userId?: string;
|
|
@@ -955,6 +955,17 @@ interface FFIDOAuthUserInfoSubscription {
|
|
|
955
955
|
interface FFIDOAuthUserInfo {
|
|
956
956
|
sub: string;
|
|
957
957
|
email: string | null;
|
|
958
|
+
/**
|
|
959
|
+
* Whether the user's email is verified on the FFID side (#3791). Use this to
|
|
960
|
+
* safely gate email-based auto account-linking (account-takeover prevention):
|
|
961
|
+
* never auto-link on an unverified email.
|
|
962
|
+
*
|
|
963
|
+
* `undefined` means the FFID server predates the field (older deployment) or
|
|
964
|
+
* the verification path could not populate it — NOT "unverified". Treat
|
|
965
|
+
* `undefined` as "unknown" and fall back to a stricter linking policy rather
|
|
966
|
+
* than coercing it to `false`/`true`.
|
|
967
|
+
*/
|
|
968
|
+
emailVerified?: boolean | undefined;
|
|
958
969
|
name: string | null;
|
|
959
970
|
picture: string | null;
|
|
960
971
|
companyName?: string | null | undefined;
|
|
@@ -1353,34 +1364,6 @@ interface ContractWizardSubscriptionOptions {
|
|
|
1353
1364
|
organizationId?: string;
|
|
1354
1365
|
}
|
|
1355
1366
|
|
|
1356
|
-
/** Redirect and URL generation - redirectToLogin / redirectToAuthorize / redirectToLogout / getLoginUrl / getSignupUrl / getLogoutUrl */
|
|
1357
|
-
|
|
1358
|
-
/**
|
|
1359
|
-
* `screen_hint=signup` query value for `/oauth/authorize` (#2908 / #2911).
|
|
1360
|
-
* Forwards to Supabase Auth signup screen; only the `'signup'` value is
|
|
1361
|
-
* propagated (no-op when `'login'` or omitted).
|
|
1362
|
-
*/
|
|
1363
|
-
declare const SCREEN_HINT_SIGNUP: "signup";
|
|
1364
|
-
/** Options for redirectToAuthorize */
|
|
1365
|
-
interface RedirectToAuthorizeOptions {
|
|
1366
|
-
/** Target organization ID — triggers org-scoped OAuth re-authorization */
|
|
1367
|
-
organizationId?: string;
|
|
1368
|
-
/**
|
|
1369
|
-
* Initial Supabase Auth screen hint (#2908 / #2911).
|
|
1370
|
-
*
|
|
1371
|
-
* - `'signup'`: forwards `?screen_hint=signup` so the FFID OAuth flow lands
|
|
1372
|
-
* on the signup screen (used by external services that want to deep-link
|
|
1373
|
-
* new users into the signup CTA).
|
|
1374
|
-
* - `'login'` / `undefined`: no `screen_hint` param is added — the default
|
|
1375
|
-
* login screen is shown.
|
|
1376
|
-
*
|
|
1377
|
-
* In cookie mode, `'signup'` redirects to the FFID `/signup` page instead
|
|
1378
|
-
* of `/login` so the SDK contract (signup-screen intent) stays consistent
|
|
1379
|
-
* regardless of `authMode`.
|
|
1380
|
-
*/
|
|
1381
|
-
screenHint?: typeof SCREEN_HINT_SIGNUP | 'login';
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
1367
|
/**
|
|
1385
1368
|
* Token Store
|
|
1386
1369
|
*
|
|
@@ -1422,6 +1405,53 @@ interface TokenStore {
|
|
|
1422
1405
|
*/
|
|
1423
1406
|
declare function createTokenStore(storageType?: 'localStorage' | 'memory'): TokenStore;
|
|
1424
1407
|
|
|
1408
|
+
/** OAuth token operations - exchangeCodeForTokens / refreshAccessToken / signOutToken */
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* Optional OAuth `state` validation for {@link exchangeCodeForTokens}.
|
|
1412
|
+
*
|
|
1413
|
+
* If a `state` is supplied on EITHER side — `expectedState` (the value persisted
|
|
1414
|
+
* at `redirectToAuthorize`) or `actualState` (the value returned on the callback
|
|
1415
|
+
* URL) — both must be present and equal before any token exchange. A mismatch
|
|
1416
|
+
* OR an omitted counterpart fails closed (no exchange) to defend against CSRF
|
|
1417
|
+
* (RFC 6749 §10.12 / #3841). Validation is skipped only when BOTH are omitted
|
|
1418
|
+
* (backward compatible — callers that don't opt in are unaffected).
|
|
1419
|
+
*/
|
|
1420
|
+
interface ExchangeCodeForTokensOptions {
|
|
1421
|
+
/** Stored state from `redirectToAuthorize` (e.g. `retrieveState()`) */
|
|
1422
|
+
expectedState?: string;
|
|
1423
|
+
/** State returned on the OAuth callback URL */
|
|
1424
|
+
actualState?: string;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
/** Redirect and URL generation - redirectToLogin / redirectToAuthorize / redirectToLogout / getLoginUrl / getSignupUrl / getLogoutUrl */
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* `screen_hint=signup` query value for `/oauth/authorize` (#2908 / #2911).
|
|
1431
|
+
* Forwards to Supabase Auth signup screen; only the `'signup'` value is
|
|
1432
|
+
* propagated (no-op when `'login'` or omitted).
|
|
1433
|
+
*/
|
|
1434
|
+
declare const SCREEN_HINT_SIGNUP: "signup";
|
|
1435
|
+
/** Options for redirectToAuthorize */
|
|
1436
|
+
interface RedirectToAuthorizeOptions {
|
|
1437
|
+
/** Target organization ID — triggers org-scoped OAuth re-authorization */
|
|
1438
|
+
organizationId?: string;
|
|
1439
|
+
/**
|
|
1440
|
+
* Initial Supabase Auth screen hint (#2908 / #2911).
|
|
1441
|
+
*
|
|
1442
|
+
* - `'signup'`: forwards `?screen_hint=signup` so the FFID OAuth flow lands
|
|
1443
|
+
* on the signup screen (used by external services that want to deep-link
|
|
1444
|
+
* new users into the signup CTA).
|
|
1445
|
+
* - `'login'` / `undefined`: no `screen_hint` param is added — the default
|
|
1446
|
+
* login screen is shown.
|
|
1447
|
+
*
|
|
1448
|
+
* In cookie mode, `'signup'` redirects to the FFID `/signup` page instead
|
|
1449
|
+
* of `/login` so the SDK contract (signup-screen intent) stays consistent
|
|
1450
|
+
* regardless of `authMode`.
|
|
1451
|
+
*/
|
|
1452
|
+
screenHint?: typeof SCREEN_HINT_SIGNUP | 'login';
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1425
1455
|
/** Creates an FFID API client instance */
|
|
1426
1456
|
declare function createFFIDClient(config: FFIDConfig): {
|
|
1427
1457
|
getSession: () => Promise<FFIDApiResponse<FFIDSessionResponse>>;
|
|
@@ -1433,7 +1463,7 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1433
1463
|
getLogoutUrl: (postLogoutRedirectUri?: string) => string;
|
|
1434
1464
|
getSignupUrl: (redirectUrl?: string) => string;
|
|
1435
1465
|
createError: (code: string, message: string) => FFIDError;
|
|
1436
|
-
exchangeCodeForTokens: (code: string, codeVerifier?: string) => Promise<FFIDApiResponse<void>>;
|
|
1466
|
+
exchangeCodeForTokens: (code: string, codeVerifier?: string, opts?: ExchangeCodeForTokensOptions) => Promise<FFIDApiResponse<void>>;
|
|
1437
1467
|
refreshAccessToken: () => Promise<FFIDApiResponse<void>>;
|
|
1438
1468
|
checkSubscription: (params: {
|
|
1439
1469
|
userId?: string;
|
|
@@ -325,6 +325,17 @@ interface FFIDOAuthUserInfoSubscription {
|
|
|
325
325
|
interface FFIDOAuthUserInfo {
|
|
326
326
|
sub: string;
|
|
327
327
|
email: string | null;
|
|
328
|
+
/**
|
|
329
|
+
* Whether the user's email is verified on the FFID side (#3791). Use this to
|
|
330
|
+
* safely gate email-based auto account-linking (account-takeover prevention):
|
|
331
|
+
* never auto-link on an unverified email.
|
|
332
|
+
*
|
|
333
|
+
* `undefined` means the FFID server predates the field (older deployment) or
|
|
334
|
+
* the verification path could not populate it — NOT "unverified". Treat
|
|
335
|
+
* `undefined` as "unknown" and fall back to a stricter linking policy rather
|
|
336
|
+
* than coercing it to `false`/`true`.
|
|
337
|
+
*/
|
|
338
|
+
emailVerified?: boolean | undefined;
|
|
328
339
|
name: string | null;
|
|
329
340
|
picture: string | null;
|
|
330
341
|
companyName?: string | null | undefined;
|
|
@@ -819,6 +830,8 @@ interface FFIDTokenIntrospectionResponse {
|
|
|
819
830
|
active: boolean;
|
|
820
831
|
sub?: string;
|
|
821
832
|
email?: string;
|
|
833
|
+
/** Whether the user's email is verified (#3791). Optional for backward compat with older FFID. */
|
|
834
|
+
email_verified?: boolean;
|
|
822
835
|
name?: string;
|
|
823
836
|
picture?: string | null;
|
|
824
837
|
company_name?: string | null;
|
|
@@ -325,6 +325,17 @@ interface FFIDOAuthUserInfoSubscription {
|
|
|
325
325
|
interface FFIDOAuthUserInfo {
|
|
326
326
|
sub: string;
|
|
327
327
|
email: string | null;
|
|
328
|
+
/**
|
|
329
|
+
* Whether the user's email is verified on the FFID side (#3791). Use this to
|
|
330
|
+
* safely gate email-based auto account-linking (account-takeover prevention):
|
|
331
|
+
* never auto-link on an unverified email.
|
|
332
|
+
*
|
|
333
|
+
* `undefined` means the FFID server predates the field (older deployment) or
|
|
334
|
+
* the verification path could not populate it — NOT "unverified". Treat
|
|
335
|
+
* `undefined` as "unknown" and fall back to a stricter linking policy rather
|
|
336
|
+
* than coercing it to `false`/`true`.
|
|
337
|
+
*/
|
|
338
|
+
emailVerified?: boolean | undefined;
|
|
328
339
|
name: string | null;
|
|
329
340
|
picture: string | null;
|
|
330
341
|
companyName?: string | null | undefined;
|
|
@@ -819,6 +830,8 @@ interface FFIDTokenIntrospectionResponse {
|
|
|
819
830
|
active: boolean;
|
|
820
831
|
sub?: string;
|
|
821
832
|
email?: string;
|
|
833
|
+
/** Whether the user's email is verified (#3791). Optional for backward compat with older FFID. */
|
|
834
|
+
email_verified?: boolean;
|
|
822
835
|
name?: string;
|
|
823
836
|
picture?: string | null;
|
|
824
837
|
company_name?: string | null;
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJFFRO2Q5_cjs = require('./chunk-JFFRO2Q5.cjs');
|
|
4
4
|
var chunkR5WSZMUL_cjs = require('./chunk-R5WSZMUL.cjs');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -54,8 +54,8 @@ function defaultRedirect(url) {
|
|
|
54
54
|
}
|
|
55
55
|
function useRequireActiveSubscription(options) {
|
|
56
56
|
const { redirectTo, allowGrace = true, onRedirect } = options;
|
|
57
|
-
const { isLoading, error } =
|
|
58
|
-
const { effectiveStatus, isBlocked, isGrace } =
|
|
57
|
+
const { isLoading, error } = chunkJFFRO2Q5_cjs.useFFIDContext();
|
|
58
|
+
const { effectiveStatus, isBlocked, isGrace } = chunkJFFRO2Q5_cjs.useSubscription();
|
|
59
59
|
const hasFetchError = error !== null && effectiveStatus === null;
|
|
60
60
|
const shouldRedirect = !isLoading && !hasFetchError && (isBlocked || !allowGrace && isGrace || effectiveStatus === null);
|
|
61
61
|
react.useEffect(() => {
|
|
@@ -76,7 +76,7 @@ function useRequireActiveSubscription(options) {
|
|
|
76
76
|
}
|
|
77
77
|
function withFFIDAuth(Component, options = {}) {
|
|
78
78
|
const WrappedComponent = (props) => {
|
|
79
|
-
const { isLoading, isAuthenticated, login } =
|
|
79
|
+
const { isLoading, isAuthenticated, login } = chunkJFFRO2Q5_cjs.useFFIDContext();
|
|
80
80
|
const hasRedirected = react.useRef(false);
|
|
81
81
|
react.useEffect(() => {
|
|
82
82
|
if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
|
|
@@ -105,135 +105,151 @@ var FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = 1e3;
|
|
|
105
105
|
|
|
106
106
|
Object.defineProperty(exports, "ACCESS_GRANTING_EFFECTIVE_STATUSES", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkJFFRO2Q5_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "BLOCKING_EFFECTIVE_STATUSES", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkJFFRO2Q5_cjs.BLOCKING_EFFECTIVE_STATUSES; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkJFFRO2Q5_cjs.DEFAULT_API_BASE_URL; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
|
|
119
119
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkJFFRO2Q5_cjs.DEFAULT_OAUTH_SCOPES; }
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(exports, "EFFECTIVE_SUBSCRIPTION_STATUSES", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkJFFRO2Q5_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkJFFRO2Q5_cjs.FFIDAnnouncementBadge; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkJFFRO2Q5_cjs.FFIDAnnouncementList; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkJFFRO2Q5_cjs.FFIDInquiryForm; }
|
|
137
137
|
});
|
|
138
138
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
139
139
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkJFFRO2Q5_cjs.FFIDLoginButton; }
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkJFFRO2Q5_cjs.FFIDOrganizationSwitcher; }
|
|
145
145
|
});
|
|
146
146
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
147
147
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkJFFRO2Q5_cjs.FFIDProvider; }
|
|
149
149
|
});
|
|
150
150
|
Object.defineProperty(exports, "FFIDSDKError", {
|
|
151
151
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkJFFRO2Q5_cjs.FFIDSDKError; }
|
|
153
153
|
});
|
|
154
154
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
155
155
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkJFFRO2Q5_cjs.FFIDSubscriptionBadge; }
|
|
157
157
|
});
|
|
158
158
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
159
159
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkJFFRO2Q5_cjs.FFIDUserMenu; }
|
|
161
161
|
});
|
|
162
162
|
Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
|
|
163
163
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkJFFRO2Q5_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
|
|
165
165
|
});
|
|
166
166
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
|
|
167
167
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkJFFRO2Q5_cjs.FFID_INQUIRY_CATEGORIES; }
|
|
169
169
|
});
|
|
170
170
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
|
|
171
171
|
enumerable: true,
|
|
172
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkJFFRO2Q5_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
|
|
173
|
+
});
|
|
174
|
+
Object.defineProperty(exports, "clearState", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
get: function () { return chunkJFFRO2Q5_cjs.cleanupStateStorage; }
|
|
173
177
|
});
|
|
174
178
|
Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
|
|
175
179
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkJFFRO2Q5_cjs.computeEffectiveStatusFromSession; }
|
|
177
181
|
});
|
|
178
182
|
Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
|
|
179
183
|
enumerable: true,
|
|
180
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkJFFRO2Q5_cjs.createFFIDAnnouncementsClient; }
|
|
181
185
|
});
|
|
182
186
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
183
187
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkJFFRO2Q5_cjs.createFFIDClient; }
|
|
185
189
|
});
|
|
186
190
|
Object.defineProperty(exports, "createTokenStore", {
|
|
187
191
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkJFFRO2Q5_cjs.createTokenStore; }
|
|
189
193
|
});
|
|
190
194
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
191
195
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkJFFRO2Q5_cjs.generateCodeChallenge; }
|
|
193
197
|
});
|
|
194
198
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
195
199
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkJFFRO2Q5_cjs.generateCodeVerifier; }
|
|
201
|
+
});
|
|
202
|
+
Object.defineProperty(exports, "handleRedirectCallback", {
|
|
203
|
+
enumerable: true,
|
|
204
|
+
get: function () { return chunkJFFRO2Q5_cjs.handleRedirectCallback; }
|
|
197
205
|
});
|
|
198
206
|
Object.defineProperty(exports, "hasAccessFromUserinfo", {
|
|
199
207
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkJFFRO2Q5_cjs.hasAccessFromUserinfo; }
|
|
201
209
|
});
|
|
202
210
|
Object.defineProperty(exports, "isBlockedFromUserinfo", {
|
|
203
211
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkJFFRO2Q5_cjs.isBlockedFromUserinfo; }
|
|
205
213
|
});
|
|
206
214
|
Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
|
|
207
215
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkJFFRO2Q5_cjs.isFFIDInquiryCategorySite2026; }
|
|
209
217
|
});
|
|
210
218
|
Object.defineProperty(exports, "normalizeRedirectUri", {
|
|
211
219
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunkJFFRO2Q5_cjs.normalizeRedirectUri; }
|
|
213
221
|
});
|
|
214
222
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
215
223
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
224
|
+
get: function () { return chunkJFFRO2Q5_cjs.retrieveCodeVerifier; }
|
|
225
|
+
});
|
|
226
|
+
Object.defineProperty(exports, "retrieveState", {
|
|
227
|
+
enumerable: true,
|
|
228
|
+
get: function () { return chunkJFFRO2Q5_cjs.retrieveState; }
|
|
217
229
|
});
|
|
218
230
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
219
231
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunkJFFRO2Q5_cjs.storeCodeVerifier; }
|
|
233
|
+
});
|
|
234
|
+
Object.defineProperty(exports, "storeState", {
|
|
235
|
+
enumerable: true,
|
|
236
|
+
get: function () { return chunkJFFRO2Q5_cjs.storeState; }
|
|
221
237
|
});
|
|
222
238
|
Object.defineProperty(exports, "useFFID", {
|
|
223
239
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunkJFFRO2Q5_cjs.useFFID; }
|
|
225
241
|
});
|
|
226
242
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
227
243
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunkJFFRO2Q5_cjs.useFFIDAnnouncements; }
|
|
229
245
|
});
|
|
230
246
|
Object.defineProperty(exports, "useSubscription", {
|
|
231
247
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
248
|
+
get: function () { return chunkJFFRO2Q5_cjs.useSubscription; }
|
|
233
249
|
});
|
|
234
250
|
Object.defineProperty(exports, "withSubscription", {
|
|
235
251
|
enumerable: true,
|
|
236
|
-
get: function () { return
|
|
252
|
+
get: function () { return chunkJFFRO2Q5_cjs.withSubscription; }
|
|
237
253
|
});
|
|
238
254
|
Object.defineProperty(exports, "ALL_DENIED_EXCEPT_NECESSARY", {
|
|
239
255
|
enumerable: true,
|