@feelflow/ffid-sdk 5.16.2 → 5.17.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.
@@ -1095,7 +1095,7 @@ function createNonContractMethods(deps) {
1095
1095
  }
1096
1096
 
1097
1097
  // src/client/version-check.ts
1098
- var SDK_VERSION = "5.16.2";
1098
+ var SDK_VERSION = "5.17.0";
1099
1099
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
1100
1100
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
1101
1101
  function sdkHeaders() {
@@ -1941,6 +1941,9 @@ function createRedirectMethods(deps) {
1941
1941
  if (options?.screenHint === SCREEN_HINT_SIGNUP) {
1942
1942
  params.set(SCREEN_HINT_PARAM, SCREEN_HINT_SIGNUP);
1943
1943
  }
1944
+ if (options?.prompt) {
1945
+ params.set("prompt", options.prompt);
1946
+ }
1944
1947
  const authorizeUrl = `${baseUrl}${OAUTH_AUTHORIZE_ENDPOINT}?${params.toString()}`;
1945
1948
  logger.debug("Redirecting to authorize:", authorizeUrl);
1946
1949
  recordRedirectAttempt(authorizeKey, now, logger);
@@ -1960,12 +1963,12 @@ function createRedirectMethods(deps) {
1960
1963
  if (authMode === "token") {
1961
1964
  return redirectToAuthorize(options);
1962
1965
  }
1963
- const targetUrl = options?.screenHint === SCREEN_HINT_SIGNUP ? getSignupUrl() : getLoginUrl();
1966
+ const targetUrl = options?.screenHint === SCREEN_HINT_SIGNUP ? getSignupUrl() : getLoginUrl(void 0, options?.prompt ? { prompt: options.prompt } : void 0);
1964
1967
  logger.debug("Redirecting to auth page:", targetUrl);
1965
1968
  window.location.href = targetUrl;
1966
1969
  return { success: true };
1967
1970
  }
1968
- function getLoginUrl(redirectUrl) {
1971
+ function getLoginUrl(redirectUrl, options) {
1969
1972
  let redirect;
1970
1973
  if (redirectUrl != null) {
1971
1974
  redirect = redirectUrl;
@@ -1975,7 +1978,8 @@ function createRedirectMethods(deps) {
1975
1978
  logger.warn("getLoginUrl: SSR \u74B0\u5883\u3067 redirectUrl \u304C\u672A\u6307\u5B9A\u306E\u305F\u3081\u7A7A\u6587\u5B57\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF\u3057\u307E\u3059");
1976
1979
  redirect = "";
1977
1980
  }
1978
- return `${baseUrl}/login?redirect=${encodeURIComponent(redirect)}&service=${encodeURIComponent(serviceCode)}`;
1981
+ const promptSuffix = options?.prompt ? `&prompt=${encodeURIComponent(options.prompt)}` : "";
1982
+ return `${baseUrl}/login?redirect=${encodeURIComponent(redirect)}&service=${encodeURIComponent(serviceCode)}${promptSuffix}`;
1979
1983
  }
1980
1984
  function getSignupUrl(redirectUrl) {
1981
1985
  let redirect;
@@ -2007,7 +2011,10 @@ function createRedirectMethods(deps) {
2007
2011
  window.location.href = logoutUrl;
2008
2012
  return { success: true };
2009
2013
  }
2010
- return { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout };
2014
+ async function switchAccount(options) {
2015
+ return redirectToLogin({ ...options, prompt: "select_account" });
2016
+ }
2017
+ return { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout, switchAccount };
2011
2018
  }
2012
2019
 
2013
2020
  // src/client/redirect-uri.ts
@@ -2981,7 +2988,7 @@ function createFFIDClient(config) {
2981
2988
  }
2982
2989
  return signOutCookie();
2983
2990
  }
2984
- const { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout } = createRedirectMethods({
2991
+ const { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout, switchAccount } = createRedirectMethods({
2985
2992
  authMode,
2986
2993
  baseUrl,
2987
2994
  clientId,
@@ -3175,6 +3182,7 @@ function createFFIDClient(config) {
3175
3182
  redirectToLogin,
3176
3183
  redirectToAuthorize,
3177
3184
  redirectToLogout,
3185
+ switchAccount,
3178
3186
  getLoginUrl,
3179
3187
  getLogoutUrl,
3180
3188
  getSignupUrl,
@@ -3631,6 +3639,9 @@ function useFFID() {
3631
3639
  error: context.error,
3632
3640
  login: context.login,
3633
3641
  logout: context.logout,
3642
+ getLogoutUrl: client.getLogoutUrl,
3643
+ redirectToLogout: client.redirectToLogout,
3644
+ switchAccount: client.switchAccount,
3634
3645
  switchOrganization: context.switchOrganization,
3635
3646
  refresh: context.refresh,
3636
3647
  getLoginUrl: client.getLoginUrl,
@@ -1093,7 +1093,7 @@ function createNonContractMethods(deps) {
1093
1093
  }
1094
1094
 
1095
1095
  // src/client/version-check.ts
1096
- var SDK_VERSION = "5.16.2";
1096
+ var SDK_VERSION = "5.17.0";
1097
1097
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
1098
1098
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
1099
1099
  function sdkHeaders() {
@@ -1939,6 +1939,9 @@ function createRedirectMethods(deps) {
1939
1939
  if (options?.screenHint === SCREEN_HINT_SIGNUP) {
1940
1940
  params.set(SCREEN_HINT_PARAM, SCREEN_HINT_SIGNUP);
1941
1941
  }
1942
+ if (options?.prompt) {
1943
+ params.set("prompt", options.prompt);
1944
+ }
1942
1945
  const authorizeUrl = `${baseUrl}${OAUTH_AUTHORIZE_ENDPOINT}?${params.toString()}`;
1943
1946
  logger.debug("Redirecting to authorize:", authorizeUrl);
1944
1947
  recordRedirectAttempt(authorizeKey, now, logger);
@@ -1958,12 +1961,12 @@ function createRedirectMethods(deps) {
1958
1961
  if (authMode === "token") {
1959
1962
  return redirectToAuthorize(options);
1960
1963
  }
1961
- const targetUrl = options?.screenHint === SCREEN_HINT_SIGNUP ? getSignupUrl() : getLoginUrl();
1964
+ const targetUrl = options?.screenHint === SCREEN_HINT_SIGNUP ? getSignupUrl() : getLoginUrl(void 0, options?.prompt ? { prompt: options.prompt } : void 0);
1962
1965
  logger.debug("Redirecting to auth page:", targetUrl);
1963
1966
  window.location.href = targetUrl;
1964
1967
  return { success: true };
1965
1968
  }
1966
- function getLoginUrl(redirectUrl) {
1969
+ function getLoginUrl(redirectUrl, options) {
1967
1970
  let redirect;
1968
1971
  if (redirectUrl != null) {
1969
1972
  redirect = redirectUrl;
@@ -1973,7 +1976,8 @@ function createRedirectMethods(deps) {
1973
1976
  logger.warn("getLoginUrl: SSR \u74B0\u5883\u3067 redirectUrl \u304C\u672A\u6307\u5B9A\u306E\u305F\u3081\u7A7A\u6587\u5B57\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF\u3057\u307E\u3059");
1974
1977
  redirect = "";
1975
1978
  }
1976
- return `${baseUrl}/login?redirect=${encodeURIComponent(redirect)}&service=${encodeURIComponent(serviceCode)}`;
1979
+ const promptSuffix = options?.prompt ? `&prompt=${encodeURIComponent(options.prompt)}` : "";
1980
+ return `${baseUrl}/login?redirect=${encodeURIComponent(redirect)}&service=${encodeURIComponent(serviceCode)}${promptSuffix}`;
1977
1981
  }
1978
1982
  function getSignupUrl(redirectUrl) {
1979
1983
  let redirect;
@@ -2005,7 +2009,10 @@ function createRedirectMethods(deps) {
2005
2009
  window.location.href = logoutUrl;
2006
2010
  return { success: true };
2007
2011
  }
2008
- return { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout };
2012
+ async function switchAccount(options) {
2013
+ return redirectToLogin({ ...options, prompt: "select_account" });
2014
+ }
2015
+ return { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout, switchAccount };
2009
2016
  }
2010
2017
 
2011
2018
  // src/client/redirect-uri.ts
@@ -2979,7 +2986,7 @@ function createFFIDClient(config) {
2979
2986
  }
2980
2987
  return signOutCookie();
2981
2988
  }
2982
- const { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout } = createRedirectMethods({
2989
+ const { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout, switchAccount } = createRedirectMethods({
2983
2990
  authMode,
2984
2991
  baseUrl,
2985
2992
  clientId,
@@ -3173,6 +3180,7 @@ function createFFIDClient(config) {
3173
3180
  redirectToLogin,
3174
3181
  redirectToAuthorize,
3175
3182
  redirectToLogout,
3183
+ switchAccount,
3176
3184
  getLoginUrl,
3177
3185
  getLogoutUrl,
3178
3186
  getSignupUrl,
@@ -3629,6 +3637,9 @@ function useFFID() {
3629
3637
  error: context.error,
3630
3638
  login: context.login,
3631
3639
  logout: context.logout,
3640
+ getLogoutUrl: client.getLogoutUrl,
3641
+ redirectToLogout: client.redirectToLogout,
3642
+ switchAccount: client.switchAccount,
3632
3643
  switchOrganization: context.switchOrganization,
3633
3644
  refresh: context.refresh,
3634
3645
  getLoginUrl: client.getLoginUrl,
@@ -1,34 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkFLLTPPUP_cjs = require('../chunk-FLLTPPUP.cjs');
3
+ var chunkHBPYSPBY_cjs = require('../chunk-HBPYSPBY.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
8
8
  enumerable: true,
9
- get: function () { return chunkFLLTPPUP_cjs.FFIDAnnouncementBadge; }
9
+ get: function () { return chunkHBPYSPBY_cjs.FFIDAnnouncementBadge; }
10
10
  });
11
11
  Object.defineProperty(exports, "FFIDAnnouncementList", {
12
12
  enumerable: true,
13
- get: function () { return chunkFLLTPPUP_cjs.FFIDAnnouncementList; }
13
+ get: function () { return chunkHBPYSPBY_cjs.FFIDAnnouncementList; }
14
14
  });
15
15
  Object.defineProperty(exports, "FFIDInquiryForm", {
16
16
  enumerable: true,
17
- get: function () { return chunkFLLTPPUP_cjs.FFIDInquiryForm; }
17
+ get: function () { return chunkHBPYSPBY_cjs.FFIDInquiryForm; }
18
18
  });
19
19
  Object.defineProperty(exports, "FFIDLoginButton", {
20
20
  enumerable: true,
21
- get: function () { return chunkFLLTPPUP_cjs.FFIDLoginButton; }
21
+ get: function () { return chunkHBPYSPBY_cjs.FFIDLoginButton; }
22
22
  });
23
23
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
24
24
  enumerable: true,
25
- get: function () { return chunkFLLTPPUP_cjs.FFIDOrganizationSwitcher; }
25
+ get: function () { return chunkHBPYSPBY_cjs.FFIDOrganizationSwitcher; }
26
26
  });
27
27
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
28
28
  enumerable: true,
29
- get: function () { return chunkFLLTPPUP_cjs.FFIDSubscriptionBadge; }
29
+ get: function () { return chunkHBPYSPBY_cjs.FFIDSubscriptionBadge; }
30
30
  });
31
31
  Object.defineProperty(exports, "FFIDUserMenu", {
32
32
  enumerable: true,
33
- get: function () { return chunkFLLTPPUP_cjs.FFIDUserMenu; }
33
+ get: function () { return chunkHBPYSPBY_cjs.FFIDUserMenu; }
34
34
  });
@@ -1,3 +1,3 @@
1
- export { D as FFIDAnnouncementBadge, af as FFIDAnnouncementBadgeClassNames, ag as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, ah as FFIDAnnouncementListClassNames, ai as FFIDAnnouncementListProps, P as FFIDInquiryForm, Q as FFIDInquiryFormCategoryItem, R as FFIDInquiryFormClassNames, S as FFIDInquiryFormLegalLayout, T as FFIDInquiryFormOrganization, U as FFIDInquiryFormPlaceholderContext, V as FFIDInquiryFormPrefill, W as FFIDInquiryFormProps, X as FFIDInquiryFormSubmitData, Y as FFIDInquiryFormSubmitResult, _ as FFIDLoginButton, aj as FFIDLoginButtonProps, a1 as FFIDOrganizationSwitcher, ak as FFIDOrganizationSwitcherClassNames, al as FFIDOrganizationSwitcherProps, a6 as FFIDSubscriptionBadge, am as FFIDSubscriptionBadgeClassNames, an as FFIDSubscriptionBadgeProps, a8 as FFIDUserMenu, ao as FFIDUserMenuClassNames, ap as FFIDUserMenuProps } from '../index-CsVJTuPv.cjs';
1
+ export { G as FFIDAnnouncementBadge, ag as FFIDAnnouncementBadgeClassNames, ah as FFIDAnnouncementBadgeProps, H as FFIDAnnouncementList, ai as FFIDAnnouncementListClassNames, aj as FFIDAnnouncementListProps, Q as FFIDInquiryForm, R as FFIDInquiryFormCategoryItem, S as FFIDInquiryFormClassNames, T as FFIDInquiryFormLegalLayout, U as FFIDInquiryFormOrganization, V as FFIDInquiryFormPlaceholderContext, W as FFIDInquiryFormPrefill, X as FFIDInquiryFormProps, Y as FFIDInquiryFormSubmitData, Z as FFIDInquiryFormSubmitResult, $ as FFIDLoginButton, ak as FFIDLoginButtonProps, a2 as FFIDOrganizationSwitcher, al as FFIDOrganizationSwitcherClassNames, am as FFIDOrganizationSwitcherProps, a7 as FFIDSubscriptionBadge, an as FFIDSubscriptionBadgeClassNames, ao as FFIDSubscriptionBadgeProps, a9 as FFIDUserMenu, ap as FFIDUserMenuClassNames, aq as FFIDUserMenuProps } from '../index-CG0vObax.cjs';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1,3 +1,3 @@
1
- export { D as FFIDAnnouncementBadge, af as FFIDAnnouncementBadgeClassNames, ag as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, ah as FFIDAnnouncementListClassNames, ai as FFIDAnnouncementListProps, P as FFIDInquiryForm, Q as FFIDInquiryFormCategoryItem, R as FFIDInquiryFormClassNames, S as FFIDInquiryFormLegalLayout, T as FFIDInquiryFormOrganization, U as FFIDInquiryFormPlaceholderContext, V as FFIDInquiryFormPrefill, W as FFIDInquiryFormProps, X as FFIDInquiryFormSubmitData, Y as FFIDInquiryFormSubmitResult, _ as FFIDLoginButton, aj as FFIDLoginButtonProps, a1 as FFIDOrganizationSwitcher, ak as FFIDOrganizationSwitcherClassNames, al as FFIDOrganizationSwitcherProps, a6 as FFIDSubscriptionBadge, am as FFIDSubscriptionBadgeClassNames, an as FFIDSubscriptionBadgeProps, a8 as FFIDUserMenu, ao as FFIDUserMenuClassNames, ap as FFIDUserMenuProps } from '../index-CsVJTuPv.js';
1
+ export { G as FFIDAnnouncementBadge, ag as FFIDAnnouncementBadgeClassNames, ah as FFIDAnnouncementBadgeProps, H as FFIDAnnouncementList, ai as FFIDAnnouncementListClassNames, aj as FFIDAnnouncementListProps, Q as FFIDInquiryForm, R as FFIDInquiryFormCategoryItem, S as FFIDInquiryFormClassNames, T as FFIDInquiryFormLegalLayout, U as FFIDInquiryFormOrganization, V as FFIDInquiryFormPlaceholderContext, W as FFIDInquiryFormPrefill, X as FFIDInquiryFormProps, Y as FFIDInquiryFormSubmitData, Z as FFIDInquiryFormSubmitResult, $ as FFIDLoginButton, ak as FFIDLoginButtonProps, a2 as FFIDOrganizationSwitcher, al as FFIDOrganizationSwitcherClassNames, am as FFIDOrganizationSwitcherProps, a7 as FFIDSubscriptionBadge, an as FFIDSubscriptionBadgeClassNames, ao as FFIDSubscriptionBadgeProps, a9 as FFIDUserMenu, ap as FFIDUserMenuClassNames, aq as FFIDUserMenuProps } from '../index-CG0vObax.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1 +1 @@
1
- export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-C7PURRNI.js';
1
+ export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-HLCHSKAF.js';
@@ -1380,6 +1380,14 @@ interface FFIDConfig {
1380
1380
  */
1381
1381
  timeout?: number | undefined;
1382
1382
  }
1383
+ /**
1384
+ * OIDC `prompt` values the SDK forwards to FFID `/oauth/authorize` (#4027).
1385
+ *
1386
+ * - `select_account`: force the upstream IdP (Google) account chooser so RP-initiated
1387
+ * account switching is not silently re-authenticated against the residual session.
1388
+ * - `login`: force re-authentication (FFID `/login` is shown even with an active session).
1389
+ */
1390
+ type FFIDPrompt = 'select_account' | 'login';
1383
1391
  /**
1384
1392
  * Logger interface for SDK debug output
1385
1393
  *
@@ -1653,6 +1661,20 @@ interface RedirectToAuthorizeOptions {
1653
1661
  * regardless of `authMode`.
1654
1662
  */
1655
1663
  screenHint?: typeof SCREEN_HINT_SIGNUP | 'login';
1664
+ /**
1665
+ * OIDC `prompt` to forward to FFID `/oauth/authorize` (#4027).
1666
+ *
1667
+ * - `'select_account'`: forwards `prompt=select_account` so the upstream IdP
1668
+ * (Google) account chooser is shown — used by {@link switchAccount} to enable
1669
+ * RP-initiated account switching after logout (residual upstream sessions would
1670
+ * otherwise auto-re-authenticate the same account).
1671
+ * - `'login'`: forces re-authentication (FFID `/login` is shown even with an
1672
+ * active session).
1673
+ *
1674
+ * Token mode: added to the `/oauth/authorize` query. Cookie mode: forwarded as
1675
+ * `?prompt=…` on the `/login` URL (ignored for the signup screen).
1676
+ */
1677
+ prompt?: FFIDPrompt;
1656
1678
  }
1657
1679
 
1658
1680
  /** Creates an FFID API client instance */
@@ -1662,7 +1684,12 @@ declare function createFFIDClient(config: FFIDConfig): {
1662
1684
  redirectToLogin: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
1663
1685
  redirectToAuthorize: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
1664
1686
  redirectToLogout: (postLogoutRedirectUri?: string) => FFIDRedirectResult;
1665
- getLoginUrl: (redirectUrl?: string) => string;
1687
+ switchAccount: (options?: {
1688
+ organizationId?: string;
1689
+ }) => Promise<FFIDRedirectResult>;
1690
+ getLoginUrl: (redirectUrl?: string, options?: {
1691
+ prompt?: FFIDPrompt;
1692
+ }) => string;
1666
1693
  getLogoutUrl: (postLogoutRedirectUri?: string) => string;
1667
1694
  getSignupUrl: (redirectUrl?: string) => string;
1668
1695
  createError: (code: string, message: string) => FFIDError;
@@ -1380,6 +1380,14 @@ interface FFIDConfig {
1380
1380
  */
1381
1381
  timeout?: number | undefined;
1382
1382
  }
1383
+ /**
1384
+ * OIDC `prompt` values the SDK forwards to FFID `/oauth/authorize` (#4027).
1385
+ *
1386
+ * - `select_account`: force the upstream IdP (Google) account chooser so RP-initiated
1387
+ * account switching is not silently re-authenticated against the residual session.
1388
+ * - `login`: force re-authentication (FFID `/login` is shown even with an active session).
1389
+ */
1390
+ type FFIDPrompt = 'select_account' | 'login';
1383
1391
  /**
1384
1392
  * Logger interface for SDK debug output
1385
1393
  *
@@ -1653,6 +1661,20 @@ interface RedirectToAuthorizeOptions {
1653
1661
  * regardless of `authMode`.
1654
1662
  */
1655
1663
  screenHint?: typeof SCREEN_HINT_SIGNUP | 'login';
1664
+ /**
1665
+ * OIDC `prompt` to forward to FFID `/oauth/authorize` (#4027).
1666
+ *
1667
+ * - `'select_account'`: forwards `prompt=select_account` so the upstream IdP
1668
+ * (Google) account chooser is shown — used by {@link switchAccount} to enable
1669
+ * RP-initiated account switching after logout (residual upstream sessions would
1670
+ * otherwise auto-re-authenticate the same account).
1671
+ * - `'login'`: forces re-authentication (FFID `/login` is shown even with an
1672
+ * active session).
1673
+ *
1674
+ * Token mode: added to the `/oauth/authorize` query. Cookie mode: forwarded as
1675
+ * `?prompt=…` on the `/login` URL (ignored for the signup screen).
1676
+ */
1677
+ prompt?: FFIDPrompt;
1656
1678
  }
1657
1679
 
1658
1680
  /** Creates an FFID API client instance */
@@ -1662,7 +1684,12 @@ declare function createFFIDClient(config: FFIDConfig): {
1662
1684
  redirectToLogin: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
1663
1685
  redirectToAuthorize: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
1664
1686
  redirectToLogout: (postLogoutRedirectUri?: string) => FFIDRedirectResult;
1665
- getLoginUrl: (redirectUrl?: string) => string;
1687
+ switchAccount: (options?: {
1688
+ organizationId?: string;
1689
+ }) => Promise<FFIDRedirectResult>;
1690
+ getLoginUrl: (redirectUrl?: string, options?: {
1691
+ prompt?: FFIDPrompt;
1692
+ }) => string;
1666
1693
  getLogoutUrl: (postLogoutRedirectUri?: string) => string;
1667
1694
  getSignupUrl: (redirectUrl?: string) => string;
1668
1695
  createError: (code: string, message: string) => FFIDError;
@@ -483,6 +483,14 @@ interface FFIDJwtClaims {
483
483
  /** Service UUID */
484
484
  svc_id: string;
485
485
  }
486
+ /**
487
+ * OIDC `prompt` values the SDK forwards to FFID `/oauth/authorize` (#4027).
488
+ *
489
+ * - `select_account`: force the upstream IdP (Google) account chooser so RP-initiated
490
+ * account switching is not silently re-authenticated against the residual session.
491
+ * - `login`: force re-authentication (FFID `/login` is shown even with an active session).
492
+ */
493
+ type FFIDPrompt = 'select_account' | 'login';
486
494
  /**
487
495
  * FFID context value provided to consumers
488
496
  */
@@ -508,9 +516,14 @@ interface FFIDContextValue {
508
516
  * (forwards `screen_hint=signup` in token mode / redirects to `/signup`
509
517
  * in cookie mode). `'login'` and `undefined` use the default login flow.
510
518
  * See `RedirectToAuthorizeOptions` (#2908 / #2911).
519
+ * @param options.prompt OIDC `prompt` to forward to FFID `/oauth/authorize`
520
+ * (e.g. `'select_account'` to force the upstream account chooser). See
521
+ * {@link FFIDPrompt} (#4027). Prefer {@link FFIDContextValue} consumers use
522
+ * the dedicated `switchAccount()` helper on `useFFID()` for account switching.
511
523
  */
512
524
  login: (options?: {
513
525
  screenHint?: 'signup' | 'login';
526
+ prompt?: FFIDPrompt;
514
527
  }) => void;
515
528
  /** Sign out and clear session */
516
529
  logout: () => Promise<void>;
@@ -1448,4 +1461,4 @@ interface FFIDInquiryFormPlaceholderContext {
1448
1461
  }
1449
1462
  declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, legalLayout, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
1450
1463
 
1451
- export { type FFIDOAuthTokenResponse as $, type AnnouncementListResponse as A, type AnnouncementType as B, EFFECTIVE_SUBSCRIPTION_STATUSES as C, FFIDAnnouncementBadge as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, FFIDAnnouncementList as G, type FFIDAnnouncementsError as H, type FFIDAnnouncementsErrorCode as I, type FFIDAnnouncementsServerResponse as J, type FFIDCacheConfig as K, type ListAnnouncementsOptions as L, type FFIDContextValue as M, type FFIDInquiryCategory as N, type FFIDInquiryCategorySite2026 as O, FFIDInquiryForm as P, type FFIDInquiryFormCategoryItem as Q, type FFIDInquiryFormClassNames as R, type FFIDInquiryFormLegalLayout as S, type FFIDInquiryFormOrganization as T, type FFIDInquiryFormPlaceholderContext as U, type FFIDInquiryFormPrefill as V, type FFIDInquiryFormProps as W, type FFIDInquiryFormSubmitData as X, type FFIDInquiryFormSubmitResult as Y, type FFIDJwtClaims as Z, FFIDLoginButton as _, type FFIDConfig as a, type FFIDOAuthUserInfoMemberRole as a0, FFIDOrganizationSwitcher as a1, type FFIDRedirectErrorCode as a2, type FFIDSeatModel as a3, type FFIDServiceAccessDenialReason as a4, type FFIDServiceAccessFailPolicy as a5, FFIDSubscriptionBadge as a6, type FFIDTokenIntrospectionResponse as a7, FFIDUserMenu as a8, FFID_INQUIRY_CATEGORIES as a9, FFID_INQUIRY_CATEGORIES_SITE_2026 as aa, type UseFFIDAnnouncementsOptions as ab, type UseFFIDAnnouncementsReturn as ac, isFFIDInquiryCategorySite2026 as ad, useFFIDAnnouncements as ae, type FFIDAnnouncementBadgeClassNames as af, type FFIDAnnouncementBadgeProps as ag, type FFIDAnnouncementListClassNames as ah, type FFIDAnnouncementListProps as ai, type FFIDLoginButtonProps as aj, type FFIDOrganizationSwitcherClassNames as ak, type FFIDOrganizationSwitcherProps as al, type FFIDSubscriptionBadgeClassNames as am, type FFIDSubscriptionBadgeProps as an, type FFIDUserMenuClassNames as ao, type FFIDUserMenuProps as ap, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDCheckServiceAccessParams as g, type FFIDServiceAccessDecision as h, type FFIDAnalyticsConfig as i, type FFIDVerifyAccessTokenOptions as j, type FFIDOAuthUserInfo as k, type FFIDInquiryCreateParams as l, type FFIDInquiryCreateResponse as m, type FFIDAuthMode as n, type FFIDLogger as o, type FFIDCacheAdapter as p, type FFIDUser as q, type FFIDOrganization as r, type FFIDSubscription as s, type FFIDSubscriptionContextValue as t, type FFIDOAuthUserInfoSubscription as u, type FFIDAnnouncementsClientConfig as v, type FFIDAnnouncementsApiResponse as w, type FFIDAnnouncementsLogger as x, type Announcement as y, type AnnouncementStatus as z };
1464
+ export { FFIDLoginButton as $, type AnnouncementListResponse as A, type AnnouncementStatus as B, type AnnouncementType as C, EFFECTIVE_SUBSCRIPTION_STATUSES as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, FFIDAnnouncementBadge as G, FFIDAnnouncementList as H, type FFIDAnnouncementsError as I, type FFIDAnnouncementsErrorCode as J, type FFIDAnnouncementsServerResponse as K, type ListAnnouncementsOptions as L, type FFIDCacheConfig as M, type FFIDContextValue as N, type FFIDInquiryCategory as O, type FFIDInquiryCategorySite2026 as P, FFIDInquiryForm as Q, type FFIDInquiryFormCategoryItem as R, type FFIDInquiryFormClassNames as S, type FFIDInquiryFormLegalLayout as T, type FFIDInquiryFormOrganization as U, type FFIDInquiryFormPlaceholderContext as V, type FFIDInquiryFormPrefill as W, type FFIDInquiryFormProps as X, type FFIDInquiryFormSubmitData as Y, type FFIDInquiryFormSubmitResult as Z, type FFIDJwtClaims as _, type FFIDPrompt as a, type FFIDOAuthTokenResponse as a0, type FFIDOAuthUserInfoMemberRole as a1, FFIDOrganizationSwitcher as a2, type FFIDRedirectErrorCode as a3, type FFIDSeatModel as a4, type FFIDServiceAccessDenialReason as a5, type FFIDServiceAccessFailPolicy as a6, FFIDSubscriptionBadge as a7, type FFIDTokenIntrospectionResponse as a8, FFIDUserMenu as a9, FFID_INQUIRY_CATEGORIES as aa, FFID_INQUIRY_CATEGORIES_SITE_2026 as ab, type UseFFIDAnnouncementsOptions as ac, type UseFFIDAnnouncementsReturn as ad, isFFIDInquiryCategorySite2026 as ae, useFFIDAnnouncements as af, type FFIDAnnouncementBadgeClassNames as ag, type FFIDAnnouncementBadgeProps as ah, type FFIDAnnouncementListClassNames as ai, type FFIDAnnouncementListProps as aj, type FFIDLoginButtonProps as ak, type FFIDOrganizationSwitcherClassNames as al, type FFIDOrganizationSwitcherProps as am, type FFIDSubscriptionBadgeClassNames as an, type FFIDSubscriptionBadgeProps as ao, type FFIDUserMenuClassNames as ap, type FFIDUserMenuProps as aq, type FFIDConfig as b, type FFIDApiResponse as c, type FFIDSessionResponse as d, type FFIDRedirectResult as e, type FFIDError as f, type FFIDSubscriptionCheckResponse as g, type FFIDCheckServiceAccessParams as h, type FFIDServiceAccessDecision as i, type FFIDAnalyticsConfig as j, type FFIDVerifyAccessTokenOptions as k, type FFIDOAuthUserInfo as l, type FFIDInquiryCreateParams as m, type FFIDInquiryCreateResponse as n, type FFIDAuthMode as o, type FFIDLogger as p, type FFIDCacheAdapter as q, type FFIDUser as r, type FFIDOrganization as s, type FFIDSubscription as t, type FFIDSubscriptionContextValue as u, type FFIDOAuthUserInfoSubscription as v, type FFIDAnnouncementsClientConfig as w, type FFIDAnnouncementsApiResponse as x, type FFIDAnnouncementsLogger as y, type Announcement as z };
@@ -483,6 +483,14 @@ interface FFIDJwtClaims {
483
483
  /** Service UUID */
484
484
  svc_id: string;
485
485
  }
486
+ /**
487
+ * OIDC `prompt` values the SDK forwards to FFID `/oauth/authorize` (#4027).
488
+ *
489
+ * - `select_account`: force the upstream IdP (Google) account chooser so RP-initiated
490
+ * account switching is not silently re-authenticated against the residual session.
491
+ * - `login`: force re-authentication (FFID `/login` is shown even with an active session).
492
+ */
493
+ type FFIDPrompt = 'select_account' | 'login';
486
494
  /**
487
495
  * FFID context value provided to consumers
488
496
  */
@@ -508,9 +516,14 @@ interface FFIDContextValue {
508
516
  * (forwards `screen_hint=signup` in token mode / redirects to `/signup`
509
517
  * in cookie mode). `'login'` and `undefined` use the default login flow.
510
518
  * See `RedirectToAuthorizeOptions` (#2908 / #2911).
519
+ * @param options.prompt OIDC `prompt` to forward to FFID `/oauth/authorize`
520
+ * (e.g. `'select_account'` to force the upstream account chooser). See
521
+ * {@link FFIDPrompt} (#4027). Prefer {@link FFIDContextValue} consumers use
522
+ * the dedicated `switchAccount()` helper on `useFFID()` for account switching.
511
523
  */
512
524
  login: (options?: {
513
525
  screenHint?: 'signup' | 'login';
526
+ prompt?: FFIDPrompt;
514
527
  }) => void;
515
528
  /** Sign out and clear session */
516
529
  logout: () => Promise<void>;
@@ -1448,4 +1461,4 @@ interface FFIDInquiryFormPlaceholderContext {
1448
1461
  }
1449
1462
  declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, legalLayout, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
1450
1463
 
1451
- export { type FFIDOAuthTokenResponse as $, type AnnouncementListResponse as A, type AnnouncementType as B, EFFECTIVE_SUBSCRIPTION_STATUSES as C, FFIDAnnouncementBadge as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, FFIDAnnouncementList as G, type FFIDAnnouncementsError as H, type FFIDAnnouncementsErrorCode as I, type FFIDAnnouncementsServerResponse as J, type FFIDCacheConfig as K, type ListAnnouncementsOptions as L, type FFIDContextValue as M, type FFIDInquiryCategory as N, type FFIDInquiryCategorySite2026 as O, FFIDInquiryForm as P, type FFIDInquiryFormCategoryItem as Q, type FFIDInquiryFormClassNames as R, type FFIDInquiryFormLegalLayout as S, type FFIDInquiryFormOrganization as T, type FFIDInquiryFormPlaceholderContext as U, type FFIDInquiryFormPrefill as V, type FFIDInquiryFormProps as W, type FFIDInquiryFormSubmitData as X, type FFIDInquiryFormSubmitResult as Y, type FFIDJwtClaims as Z, FFIDLoginButton as _, type FFIDConfig as a, type FFIDOAuthUserInfoMemberRole as a0, FFIDOrganizationSwitcher as a1, type FFIDRedirectErrorCode as a2, type FFIDSeatModel as a3, type FFIDServiceAccessDenialReason as a4, type FFIDServiceAccessFailPolicy as a5, FFIDSubscriptionBadge as a6, type FFIDTokenIntrospectionResponse as a7, FFIDUserMenu as a8, FFID_INQUIRY_CATEGORIES as a9, FFID_INQUIRY_CATEGORIES_SITE_2026 as aa, type UseFFIDAnnouncementsOptions as ab, type UseFFIDAnnouncementsReturn as ac, isFFIDInquiryCategorySite2026 as ad, useFFIDAnnouncements as ae, type FFIDAnnouncementBadgeClassNames as af, type FFIDAnnouncementBadgeProps as ag, type FFIDAnnouncementListClassNames as ah, type FFIDAnnouncementListProps as ai, type FFIDLoginButtonProps as aj, type FFIDOrganizationSwitcherClassNames as ak, type FFIDOrganizationSwitcherProps as al, type FFIDSubscriptionBadgeClassNames as am, type FFIDSubscriptionBadgeProps as an, type FFIDUserMenuClassNames as ao, type FFIDUserMenuProps as ap, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDCheckServiceAccessParams as g, type FFIDServiceAccessDecision as h, type FFIDAnalyticsConfig as i, type FFIDVerifyAccessTokenOptions as j, type FFIDOAuthUserInfo as k, type FFIDInquiryCreateParams as l, type FFIDInquiryCreateResponse as m, type FFIDAuthMode as n, type FFIDLogger as o, type FFIDCacheAdapter as p, type FFIDUser as q, type FFIDOrganization as r, type FFIDSubscription as s, type FFIDSubscriptionContextValue as t, type FFIDOAuthUserInfoSubscription as u, type FFIDAnnouncementsClientConfig as v, type FFIDAnnouncementsApiResponse as w, type FFIDAnnouncementsLogger as x, type Announcement as y, type AnnouncementStatus as z };
1464
+ export { FFIDLoginButton as $, type AnnouncementListResponse as A, type AnnouncementStatus as B, type AnnouncementType as C, EFFECTIVE_SUBSCRIPTION_STATUSES as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, FFIDAnnouncementBadge as G, FFIDAnnouncementList as H, type FFIDAnnouncementsError as I, type FFIDAnnouncementsErrorCode as J, type FFIDAnnouncementsServerResponse as K, type ListAnnouncementsOptions as L, type FFIDCacheConfig as M, type FFIDContextValue as N, type FFIDInquiryCategory as O, type FFIDInquiryCategorySite2026 as P, FFIDInquiryForm as Q, type FFIDInquiryFormCategoryItem as R, type FFIDInquiryFormClassNames as S, type FFIDInquiryFormLegalLayout as T, type FFIDInquiryFormOrganization as U, type FFIDInquiryFormPlaceholderContext as V, type FFIDInquiryFormPrefill as W, type FFIDInquiryFormProps as X, type FFIDInquiryFormSubmitData as Y, type FFIDInquiryFormSubmitResult as Z, type FFIDJwtClaims as _, type FFIDPrompt as a, type FFIDOAuthTokenResponse as a0, type FFIDOAuthUserInfoMemberRole as a1, FFIDOrganizationSwitcher as a2, type FFIDRedirectErrorCode as a3, type FFIDSeatModel as a4, type FFIDServiceAccessDenialReason as a5, type FFIDServiceAccessFailPolicy as a6, FFIDSubscriptionBadge as a7, type FFIDTokenIntrospectionResponse as a8, FFIDUserMenu as a9, FFID_INQUIRY_CATEGORIES as aa, FFID_INQUIRY_CATEGORIES_SITE_2026 as ab, type UseFFIDAnnouncementsOptions as ac, type UseFFIDAnnouncementsReturn as ad, isFFIDInquiryCategorySite2026 as ae, useFFIDAnnouncements as af, type FFIDAnnouncementBadgeClassNames as ag, type FFIDAnnouncementBadgeProps as ah, type FFIDAnnouncementListClassNames as ai, type FFIDAnnouncementListProps as aj, type FFIDLoginButtonProps as ak, type FFIDOrganizationSwitcherClassNames as al, type FFIDOrganizationSwitcherProps as am, type FFIDSubscriptionBadgeClassNames as an, type FFIDSubscriptionBadgeProps as ao, type FFIDUserMenuClassNames as ap, type FFIDUserMenuProps as aq, type FFIDConfig as b, type FFIDApiResponse as c, type FFIDSessionResponse as d, type FFIDRedirectResult as e, type FFIDError as f, type FFIDSubscriptionCheckResponse as g, type FFIDCheckServiceAccessParams as h, type FFIDServiceAccessDecision as i, type FFIDAnalyticsConfig as j, type FFIDVerifyAccessTokenOptions as k, type FFIDOAuthUserInfo as l, type FFIDInquiryCreateParams as m, type FFIDInquiryCreateResponse as n, type FFIDAuthMode as o, type FFIDLogger as p, type FFIDCacheAdapter as q, type FFIDUser as r, type FFIDOrganization as s, type FFIDSubscription as t, type FFIDSubscriptionContextValue as u, type FFIDOAuthUserInfoSubscription as v, type FFIDAnnouncementsClientConfig as w, type FFIDAnnouncementsApiResponse as x, type FFIDAnnouncementsLogger as y, type Announcement as z };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkFLLTPPUP_cjs = require('./chunk-FLLTPPUP.cjs');
3
+ var chunkHBPYSPBY_cjs = require('./chunk-HBPYSPBY.cjs');
4
4
  var chunkH5O2CCAY_cjs = require('./chunk-H5O2CCAY.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 } = chunkFLLTPPUP_cjs.useFFIDContext();
58
- const { effectiveStatus, isBlocked, isGrace } = chunkFLLTPPUP_cjs.useSubscription();
57
+ const { isLoading, error } = chunkHBPYSPBY_cjs.useFFIDContext();
58
+ const { effectiveStatus, isBlocked, isGrace } = chunkHBPYSPBY_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 } = chunkFLLTPPUP_cjs.useFFIDContext();
79
+ const { isLoading, isAuthenticated, login } = chunkHBPYSPBY_cjs.useFFIDContext();
80
80
  const hasRedirected = react.useRef(false);
81
81
  react.useEffect(() => {
82
82
  if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
@@ -105,151 +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 chunkFLLTPPUP_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
108
+ get: function () { return chunkHBPYSPBY_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
109
109
  });
110
110
  Object.defineProperty(exports, "BLOCKING_EFFECTIVE_STATUSES", {
111
111
  enumerable: true,
112
- get: function () { return chunkFLLTPPUP_cjs.BLOCKING_EFFECTIVE_STATUSES; }
112
+ get: function () { return chunkHBPYSPBY_cjs.BLOCKING_EFFECTIVE_STATUSES; }
113
113
  });
114
114
  Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
115
115
  enumerable: true,
116
- get: function () { return chunkFLLTPPUP_cjs.DEFAULT_API_BASE_URL; }
116
+ get: function () { return chunkHBPYSPBY_cjs.DEFAULT_API_BASE_URL; }
117
117
  });
118
118
  Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
119
119
  enumerable: true,
120
- get: function () { return chunkFLLTPPUP_cjs.DEFAULT_OAUTH_SCOPES; }
120
+ get: function () { return chunkHBPYSPBY_cjs.DEFAULT_OAUTH_SCOPES; }
121
121
  });
122
122
  Object.defineProperty(exports, "EFFECTIVE_SUBSCRIPTION_STATUSES", {
123
123
  enumerable: true,
124
- get: function () { return chunkFLLTPPUP_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
124
+ get: function () { return chunkHBPYSPBY_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
125
125
  });
126
126
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
127
127
  enumerable: true,
128
- get: function () { return chunkFLLTPPUP_cjs.FFIDAnnouncementBadge; }
128
+ get: function () { return chunkHBPYSPBY_cjs.FFIDAnnouncementBadge; }
129
129
  });
130
130
  Object.defineProperty(exports, "FFIDAnnouncementList", {
131
131
  enumerable: true,
132
- get: function () { return chunkFLLTPPUP_cjs.FFIDAnnouncementList; }
132
+ get: function () { return chunkHBPYSPBY_cjs.FFIDAnnouncementList; }
133
133
  });
134
134
  Object.defineProperty(exports, "FFIDInquiryForm", {
135
135
  enumerable: true,
136
- get: function () { return chunkFLLTPPUP_cjs.FFIDInquiryForm; }
136
+ get: function () { return chunkHBPYSPBY_cjs.FFIDInquiryForm; }
137
137
  });
138
138
  Object.defineProperty(exports, "FFIDLoginButton", {
139
139
  enumerable: true,
140
- get: function () { return chunkFLLTPPUP_cjs.FFIDLoginButton; }
140
+ get: function () { return chunkHBPYSPBY_cjs.FFIDLoginButton; }
141
141
  });
142
142
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
143
143
  enumerable: true,
144
- get: function () { return chunkFLLTPPUP_cjs.FFIDOrganizationSwitcher; }
144
+ get: function () { return chunkHBPYSPBY_cjs.FFIDOrganizationSwitcher; }
145
145
  });
146
146
  Object.defineProperty(exports, "FFIDProvider", {
147
147
  enumerable: true,
148
- get: function () { return chunkFLLTPPUP_cjs.FFIDProvider; }
148
+ get: function () { return chunkHBPYSPBY_cjs.FFIDProvider; }
149
149
  });
150
150
  Object.defineProperty(exports, "FFIDSDKError", {
151
151
  enumerable: true,
152
- get: function () { return chunkFLLTPPUP_cjs.FFIDSDKError; }
152
+ get: function () { return chunkHBPYSPBY_cjs.FFIDSDKError; }
153
153
  });
154
154
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
155
155
  enumerable: true,
156
- get: function () { return chunkFLLTPPUP_cjs.FFIDSubscriptionBadge; }
156
+ get: function () { return chunkHBPYSPBY_cjs.FFIDSubscriptionBadge; }
157
157
  });
158
158
  Object.defineProperty(exports, "FFIDUserMenu", {
159
159
  enumerable: true,
160
- get: function () { return chunkFLLTPPUP_cjs.FFIDUserMenu; }
160
+ get: function () { return chunkHBPYSPBY_cjs.FFIDUserMenu; }
161
161
  });
162
162
  Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
163
163
  enumerable: true,
164
- get: function () { return chunkFLLTPPUP_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
164
+ get: function () { return chunkHBPYSPBY_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
165
165
  });
166
166
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
167
167
  enumerable: true,
168
- get: function () { return chunkFLLTPPUP_cjs.FFID_INQUIRY_CATEGORIES; }
168
+ get: function () { return chunkHBPYSPBY_cjs.FFID_INQUIRY_CATEGORIES; }
169
169
  });
170
170
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
171
171
  enumerable: true,
172
- get: function () { return chunkFLLTPPUP_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
172
+ get: function () { return chunkHBPYSPBY_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
173
173
  });
174
174
  Object.defineProperty(exports, "clearState", {
175
175
  enumerable: true,
176
- get: function () { return chunkFLLTPPUP_cjs.cleanupStateStorage; }
176
+ get: function () { return chunkHBPYSPBY_cjs.cleanupStateStorage; }
177
177
  });
178
178
  Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
179
179
  enumerable: true,
180
- get: function () { return chunkFLLTPPUP_cjs.computeEffectiveStatusFromSession; }
180
+ get: function () { return chunkHBPYSPBY_cjs.computeEffectiveStatusFromSession; }
181
181
  });
182
182
  Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
183
183
  enumerable: true,
184
- get: function () { return chunkFLLTPPUP_cjs.createFFIDAnnouncementsClient; }
184
+ get: function () { return chunkHBPYSPBY_cjs.createFFIDAnnouncementsClient; }
185
185
  });
186
186
  Object.defineProperty(exports, "createFFIDClient", {
187
187
  enumerable: true,
188
- get: function () { return chunkFLLTPPUP_cjs.createFFIDClient; }
188
+ get: function () { return chunkHBPYSPBY_cjs.createFFIDClient; }
189
189
  });
190
190
  Object.defineProperty(exports, "createTokenStore", {
191
191
  enumerable: true,
192
- get: function () { return chunkFLLTPPUP_cjs.createTokenStore; }
192
+ get: function () { return chunkHBPYSPBY_cjs.createTokenStore; }
193
193
  });
194
194
  Object.defineProperty(exports, "generateCodeChallenge", {
195
195
  enumerable: true,
196
- get: function () { return chunkFLLTPPUP_cjs.generateCodeChallenge; }
196
+ get: function () { return chunkHBPYSPBY_cjs.generateCodeChallenge; }
197
197
  });
198
198
  Object.defineProperty(exports, "generateCodeVerifier", {
199
199
  enumerable: true,
200
- get: function () { return chunkFLLTPPUP_cjs.generateCodeVerifier; }
200
+ get: function () { return chunkHBPYSPBY_cjs.generateCodeVerifier; }
201
201
  });
202
202
  Object.defineProperty(exports, "handleRedirectCallback", {
203
203
  enumerable: true,
204
- get: function () { return chunkFLLTPPUP_cjs.handleRedirectCallback; }
204
+ get: function () { return chunkHBPYSPBY_cjs.handleRedirectCallback; }
205
205
  });
206
206
  Object.defineProperty(exports, "hasAccessFromUserinfo", {
207
207
  enumerable: true,
208
- get: function () { return chunkFLLTPPUP_cjs.hasAccessFromUserinfo; }
208
+ get: function () { return chunkHBPYSPBY_cjs.hasAccessFromUserinfo; }
209
209
  });
210
210
  Object.defineProperty(exports, "isBlockedFromUserinfo", {
211
211
  enumerable: true,
212
- get: function () { return chunkFLLTPPUP_cjs.isBlockedFromUserinfo; }
212
+ get: function () { return chunkHBPYSPBY_cjs.isBlockedFromUserinfo; }
213
213
  });
214
214
  Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
215
215
  enumerable: true,
216
- get: function () { return chunkFLLTPPUP_cjs.isFFIDInquiryCategorySite2026; }
216
+ get: function () { return chunkHBPYSPBY_cjs.isFFIDInquiryCategorySite2026; }
217
217
  });
218
218
  Object.defineProperty(exports, "normalizeRedirectUri", {
219
219
  enumerable: true,
220
- get: function () { return chunkFLLTPPUP_cjs.normalizeRedirectUri; }
220
+ get: function () { return chunkHBPYSPBY_cjs.normalizeRedirectUri; }
221
221
  });
222
222
  Object.defineProperty(exports, "retrieveCodeVerifier", {
223
223
  enumerable: true,
224
- get: function () { return chunkFLLTPPUP_cjs.retrieveCodeVerifier; }
224
+ get: function () { return chunkHBPYSPBY_cjs.retrieveCodeVerifier; }
225
225
  });
226
226
  Object.defineProperty(exports, "retrieveState", {
227
227
  enumerable: true,
228
- get: function () { return chunkFLLTPPUP_cjs.retrieveState; }
228
+ get: function () { return chunkHBPYSPBY_cjs.retrieveState; }
229
229
  });
230
230
  Object.defineProperty(exports, "storeCodeVerifier", {
231
231
  enumerable: true,
232
- get: function () { return chunkFLLTPPUP_cjs.storeCodeVerifier; }
232
+ get: function () { return chunkHBPYSPBY_cjs.storeCodeVerifier; }
233
233
  });
234
234
  Object.defineProperty(exports, "storeState", {
235
235
  enumerable: true,
236
- get: function () { return chunkFLLTPPUP_cjs.storeState; }
236
+ get: function () { return chunkHBPYSPBY_cjs.storeState; }
237
237
  });
238
238
  Object.defineProperty(exports, "useFFID", {
239
239
  enumerable: true,
240
- get: function () { return chunkFLLTPPUP_cjs.useFFID; }
240
+ get: function () { return chunkHBPYSPBY_cjs.useFFID; }
241
241
  });
242
242
  Object.defineProperty(exports, "useFFIDAnnouncements", {
243
243
  enumerable: true,
244
- get: function () { return chunkFLLTPPUP_cjs.useFFIDAnnouncements; }
244
+ get: function () { return chunkHBPYSPBY_cjs.useFFIDAnnouncements; }
245
245
  });
246
246
  Object.defineProperty(exports, "useSubscription", {
247
247
  enumerable: true,
248
- get: function () { return chunkFLLTPPUP_cjs.useSubscription; }
248
+ get: function () { return chunkHBPYSPBY_cjs.useSubscription; }
249
249
  });
250
250
  Object.defineProperty(exports, "withSubscription", {
251
251
  enumerable: true,
252
- get: function () { return chunkFLLTPPUP_cjs.withSubscription; }
252
+ get: function () { return chunkHBPYSPBY_cjs.withSubscription; }
253
253
  });
254
254
  Object.defineProperty(exports, "ALL_DENIED_EXCEPT_NECESSARY", {
255
255
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDAnalyticsConfig, j as FFIDVerifyAccessTokenOptions, k as FFIDOAuthUserInfo, l as FFIDInquiryCreateParams, m as FFIDInquiryCreateResponse, n as FFIDAuthMode, o as FFIDLogger, p as FFIDCacheAdapter, q as FFIDUser, r as FFIDOrganization, s as FFIDSubscription, t as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, u as FFIDOAuthUserInfoSubscription, v as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, w as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, x as FFIDAnnouncementsLogger } from './index-CsVJTuPv.cjs';
2
- export { y as Announcement, z as AnnouncementStatus, B as AnnouncementType, C as EFFECTIVE_SUBSCRIPTION_STATUSES, D as FFIDAnnouncementBadge, G as FFIDAnnouncementList, H as FFIDAnnouncementsError, I as FFIDAnnouncementsErrorCode, J as FFIDAnnouncementsServerResponse, K as FFIDCacheConfig, M as FFIDContextValue, N as FFIDInquiryCategory, O as FFIDInquiryCategorySite2026, P as FFIDInquiryForm, Q as FFIDInquiryFormCategoryItem, R as FFIDInquiryFormClassNames, S as FFIDInquiryFormLegalLayout, T as FFIDInquiryFormOrganization, U as FFIDInquiryFormPlaceholderContext, V as FFIDInquiryFormPrefill, W as FFIDInquiryFormProps, X as FFIDInquiryFormSubmitData, Y as FFIDInquiryFormSubmitResult, Z as FFIDJwtClaims, _ as FFIDLoginButton, $ as FFIDOAuthTokenResponse, a0 as FFIDOAuthUserInfoMemberRole, a1 as FFIDOrganizationSwitcher, a2 as FFIDRedirectErrorCode, a3 as FFIDSeatModel, a4 as FFIDServiceAccessDenialReason, a5 as FFIDServiceAccessFailPolicy, a6 as FFIDSubscriptionBadge, a7 as FFIDTokenIntrospectionResponse, a8 as FFIDUserMenu, a9 as FFID_INQUIRY_CATEGORIES, aa as FFID_INQUIRY_CATEGORIES_SITE_2026, ab as UseFFIDAnnouncementsOptions, ac as UseFFIDAnnouncementsReturn, ad as isFFIDInquiryCategorySite2026, ae as useFFIDAnnouncements } from './index-CsVJTuPv.cjs';
1
+ import { F as FFIDSubscriptionStatus, a as FFIDPrompt, b as FFIDConfig, c as FFIDApiResponse, d as FFIDSessionResponse, e as FFIDRedirectResult, f as FFIDError, g as FFIDSubscriptionCheckResponse, h as FFIDCheckServiceAccessParams, i as FFIDServiceAccessDecision, j as FFIDAnalyticsConfig, k as FFIDVerifyAccessTokenOptions, l as FFIDOAuthUserInfo, m as FFIDInquiryCreateParams, n as FFIDInquiryCreateResponse, o as FFIDAuthMode, p as FFIDLogger, q as FFIDCacheAdapter, r as FFIDUser, s as FFIDOrganization, t as FFIDSubscription, u as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, v as FFIDOAuthUserInfoSubscription, w as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, x as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, y as FFIDAnnouncementsLogger } from './index-CG0vObax.cjs';
2
+ export { z as Announcement, B as AnnouncementStatus, C as AnnouncementType, D as EFFECTIVE_SUBSCRIPTION_STATUSES, G as FFIDAnnouncementBadge, H as FFIDAnnouncementList, I as FFIDAnnouncementsError, J as FFIDAnnouncementsErrorCode, K as FFIDAnnouncementsServerResponse, M as FFIDCacheConfig, N as FFIDContextValue, O as FFIDInquiryCategory, P as FFIDInquiryCategorySite2026, Q as FFIDInquiryForm, R as FFIDInquiryFormCategoryItem, S as FFIDInquiryFormClassNames, T as FFIDInquiryFormLegalLayout, U as FFIDInquiryFormOrganization, V as FFIDInquiryFormPlaceholderContext, W as FFIDInquiryFormPrefill, X as FFIDInquiryFormProps, Y as FFIDInquiryFormSubmitData, Z as FFIDInquiryFormSubmitResult, _ as FFIDJwtClaims, $ as FFIDLoginButton, a0 as FFIDOAuthTokenResponse, a1 as FFIDOAuthUserInfoMemberRole, a2 as FFIDOrganizationSwitcher, a3 as FFIDRedirectErrorCode, a4 as FFIDSeatModel, a5 as FFIDServiceAccessDenialReason, a6 as FFIDServiceAccessFailPolicy, a7 as FFIDSubscriptionBadge, a8 as FFIDTokenIntrospectionResponse, a9 as FFIDUserMenu, aa as FFID_INQUIRY_CATEGORIES, ab as FFID_INQUIRY_CATEGORIES_SITE_2026, ac as UseFFIDAnnouncementsOptions, ad as UseFFIDAnnouncementsReturn, ae as isFFIDInquiryCategorySite2026, af as useFFIDAnnouncements } from './index-CG0vObax.cjs';
3
3
  export { A as ALL_DENIED_EXCEPT_NECESSARY, i as CONSENT_COOKIE_NAME, j as CONSENT_DISMISSAL_TIMESTAMP_KEY, l as COOKIE_VERSION, D as DEFAULT_CONSENT_ERROR_MESSAGES, o as FFIDAnalyticsProvider, p as FFIDAnalyticsProviderProps, c as FFIDConsentCategories, r as FFIDConsentCategoryCode, e as FFIDConsentCategoryMetadata, w as FFIDConsentError, x as FFIDConsentErrorCode, y as FFIDConsentMergeStrategy, B as FFIDConsentMergeWarning, E as FFIDConsentMergeWarningEvent, F as FFIDConsentResult, I as FFIDConsentSource, a as FFIDConsentState, d as FFIDConsentSyncResult, M as FFIDCookieBanner, N as FFIDCookieBannerClassNames, O as FFIDCookieBannerProps, Q as FFIDCookieLink, R as FFIDCookieLinkProps, f as FFIDCookiePolicy, T as FFIDCookieSettings, U as FFIDCookieSettingsClassNames, V as FFIDCookieSettingsProps, _ as FFID_CONSENT_ERROR_CODES, ae as UseFFIDConsentPreferencesReturn, af as UseFFIDConsentReturn, ag as clearConsentDismissalTimestamp, aj as decodeConsentCookie, al as encodeConsentCookie, an as readConsentCookie, ao as readConsentDismissalTimestamp, aq as useFFIDConsent, ar as useFFIDConsentPreferences, as as writeConsentCookie, at as writeConsentDismissalTimestamp } from './FFIDCookieLink-BJgVcJyw.cjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { ReactNode, ComponentType, FC } from 'react';
@@ -1111,6 +1111,20 @@ interface RedirectToAuthorizeOptions {
1111
1111
  * regardless of `authMode`.
1112
1112
  */
1113
1113
  screenHint?: typeof SCREEN_HINT_SIGNUP | 'login';
1114
+ /**
1115
+ * OIDC `prompt` to forward to FFID `/oauth/authorize` (#4027).
1116
+ *
1117
+ * - `'select_account'`: forwards `prompt=select_account` so the upstream IdP
1118
+ * (Google) account chooser is shown — used by {@link switchAccount} to enable
1119
+ * RP-initiated account switching after logout (residual upstream sessions would
1120
+ * otherwise auto-re-authenticate the same account).
1121
+ * - `'login'`: forces re-authentication (FFID `/login` is shown even with an
1122
+ * active session).
1123
+ *
1124
+ * Token mode: added to the `/oauth/authorize` query. Cookie mode: forwarded as
1125
+ * `?prompt=…` on the `/login` URL (ignored for the signup screen).
1126
+ */
1127
+ prompt?: FFIDPrompt;
1114
1128
  }
1115
1129
 
1116
1130
  /** Creates an FFID API client instance */
@@ -1120,7 +1134,12 @@ declare function createFFIDClient(config: FFIDConfig): {
1120
1134
  redirectToLogin: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
1121
1135
  redirectToAuthorize: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
1122
1136
  redirectToLogout: (postLogoutRedirectUri?: string) => FFIDRedirectResult;
1123
- getLoginUrl: (redirectUrl?: string) => string;
1137
+ switchAccount: (options?: {
1138
+ organizationId?: string;
1139
+ }) => Promise<FFIDRedirectResult>;
1140
+ getLoginUrl: (redirectUrl?: string, options?: {
1141
+ prompt?: FFIDPrompt;
1142
+ }) => string;
1124
1143
  getLogoutUrl: (postLogoutRedirectUri?: string) => string;
1125
1144
  getSignupUrl: (redirectUrl?: string) => string;
1126
1145
  createError: (code: string, message: string) => FFIDError;
@@ -1375,12 +1394,36 @@ interface UseFFIDReturn {
1375
1394
  * (forwards `screen_hint=signup` in token mode / redirects to `/signup`
1376
1395
  * in cookie mode). `'login'` and `undefined` use the default login flow.
1377
1396
  * See `RedirectToAuthorizeOptions` (#2908 / #2911).
1397
+ * @param options.prompt OIDC `prompt` forwarded to FFID `/oauth/authorize`
1398
+ * (e.g. `'select_account'` to force the upstream account chooser). For account
1399
+ * switching, prefer the dedicated {@link UseFFIDReturn.switchAccount} helper (#4027).
1378
1400
  */
1379
1401
  login: (options?: {
1380
1402
  screenHint?: 'signup' | 'login';
1403
+ prompt?: FFIDPrompt;
1381
1404
  }) => void;
1382
- /** Sign out */
1405
+ /** Sign out (client-side: clears local session via the signout API) */
1383
1406
  logout: () => Promise<void>;
1407
+ /**
1408
+ * Get the FFID SSO logout URL (RP-initiated logout). Includes `client_id` for
1409
+ * `post_logout_redirect_uri` validation. Use for cross-origin browser navigation
1410
+ * that must clear the SSO session cookie (#4027).
1411
+ */
1412
+ getLogoutUrl: (postLogoutRedirectUri?: string) => string;
1413
+ /**
1414
+ * Redirect to the FFID SSO logout endpoint (clears the SSO session cookie via a
1415
+ * top-level browser navigation, so SameSite=Lax cookies are sent). #4027.
1416
+ */
1417
+ redirectToLogout: (postLogoutRedirectUri?: string) => FFIDRedirectResult;
1418
+ /**
1419
+ * Switch / add account: forces the upstream Google account chooser via
1420
+ * `prompt=select_account` so RP-initiated account switching is not silently
1421
+ * re-authenticated against the residual upstream session. Pair with
1422
+ * {@link UseFFIDReturn.redirectToLogout} if an explicit signed-out step is needed (#4027).
1423
+ */
1424
+ switchAccount: (options?: {
1425
+ organizationId?: string;
1426
+ }) => Promise<FFIDRedirectResult>;
1384
1427
  /**
1385
1428
  * Switch current organization.
1386
1429
  * Cookie mode: local state change. Token mode: OAuth re-authorization redirect.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDAnalyticsConfig, j as FFIDVerifyAccessTokenOptions, k as FFIDOAuthUserInfo, l as FFIDInquiryCreateParams, m as FFIDInquiryCreateResponse, n as FFIDAuthMode, o as FFIDLogger, p as FFIDCacheAdapter, q as FFIDUser, r as FFIDOrganization, s as FFIDSubscription, t as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, u as FFIDOAuthUserInfoSubscription, v as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, w as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, x as FFIDAnnouncementsLogger } from './index-CsVJTuPv.js';
2
- export { y as Announcement, z as AnnouncementStatus, B as AnnouncementType, C as EFFECTIVE_SUBSCRIPTION_STATUSES, D as FFIDAnnouncementBadge, G as FFIDAnnouncementList, H as FFIDAnnouncementsError, I as FFIDAnnouncementsErrorCode, J as FFIDAnnouncementsServerResponse, K as FFIDCacheConfig, M as FFIDContextValue, N as FFIDInquiryCategory, O as FFIDInquiryCategorySite2026, P as FFIDInquiryForm, Q as FFIDInquiryFormCategoryItem, R as FFIDInquiryFormClassNames, S as FFIDInquiryFormLegalLayout, T as FFIDInquiryFormOrganization, U as FFIDInquiryFormPlaceholderContext, V as FFIDInquiryFormPrefill, W as FFIDInquiryFormProps, X as FFIDInquiryFormSubmitData, Y as FFIDInquiryFormSubmitResult, Z as FFIDJwtClaims, _ as FFIDLoginButton, $ as FFIDOAuthTokenResponse, a0 as FFIDOAuthUserInfoMemberRole, a1 as FFIDOrganizationSwitcher, a2 as FFIDRedirectErrorCode, a3 as FFIDSeatModel, a4 as FFIDServiceAccessDenialReason, a5 as FFIDServiceAccessFailPolicy, a6 as FFIDSubscriptionBadge, a7 as FFIDTokenIntrospectionResponse, a8 as FFIDUserMenu, a9 as FFID_INQUIRY_CATEGORIES, aa as FFID_INQUIRY_CATEGORIES_SITE_2026, ab as UseFFIDAnnouncementsOptions, ac as UseFFIDAnnouncementsReturn, ad as isFFIDInquiryCategorySite2026, ae as useFFIDAnnouncements } from './index-CsVJTuPv.js';
1
+ import { F as FFIDSubscriptionStatus, a as FFIDPrompt, b as FFIDConfig, c as FFIDApiResponse, d as FFIDSessionResponse, e as FFIDRedirectResult, f as FFIDError, g as FFIDSubscriptionCheckResponse, h as FFIDCheckServiceAccessParams, i as FFIDServiceAccessDecision, j as FFIDAnalyticsConfig, k as FFIDVerifyAccessTokenOptions, l as FFIDOAuthUserInfo, m as FFIDInquiryCreateParams, n as FFIDInquiryCreateResponse, o as FFIDAuthMode, p as FFIDLogger, q as FFIDCacheAdapter, r as FFIDUser, s as FFIDOrganization, t as FFIDSubscription, u as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, v as FFIDOAuthUserInfoSubscription, w as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, x as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, y as FFIDAnnouncementsLogger } from './index-CG0vObax.js';
2
+ export { z as Announcement, B as AnnouncementStatus, C as AnnouncementType, D as EFFECTIVE_SUBSCRIPTION_STATUSES, G as FFIDAnnouncementBadge, H as FFIDAnnouncementList, I as FFIDAnnouncementsError, J as FFIDAnnouncementsErrorCode, K as FFIDAnnouncementsServerResponse, M as FFIDCacheConfig, N as FFIDContextValue, O as FFIDInquiryCategory, P as FFIDInquiryCategorySite2026, Q as FFIDInquiryForm, R as FFIDInquiryFormCategoryItem, S as FFIDInquiryFormClassNames, T as FFIDInquiryFormLegalLayout, U as FFIDInquiryFormOrganization, V as FFIDInquiryFormPlaceholderContext, W as FFIDInquiryFormPrefill, X as FFIDInquiryFormProps, Y as FFIDInquiryFormSubmitData, Z as FFIDInquiryFormSubmitResult, _ as FFIDJwtClaims, $ as FFIDLoginButton, a0 as FFIDOAuthTokenResponse, a1 as FFIDOAuthUserInfoMemberRole, a2 as FFIDOrganizationSwitcher, a3 as FFIDRedirectErrorCode, a4 as FFIDSeatModel, a5 as FFIDServiceAccessDenialReason, a6 as FFIDServiceAccessFailPolicy, a7 as FFIDSubscriptionBadge, a8 as FFIDTokenIntrospectionResponse, a9 as FFIDUserMenu, aa as FFID_INQUIRY_CATEGORIES, ab as FFID_INQUIRY_CATEGORIES_SITE_2026, ac as UseFFIDAnnouncementsOptions, ad as UseFFIDAnnouncementsReturn, ae as isFFIDInquiryCategorySite2026, af as useFFIDAnnouncements } from './index-CG0vObax.js';
3
3
  export { A as ALL_DENIED_EXCEPT_NECESSARY, i as CONSENT_COOKIE_NAME, j as CONSENT_DISMISSAL_TIMESTAMP_KEY, l as COOKIE_VERSION, D as DEFAULT_CONSENT_ERROR_MESSAGES, o as FFIDAnalyticsProvider, p as FFIDAnalyticsProviderProps, c as FFIDConsentCategories, r as FFIDConsentCategoryCode, e as FFIDConsentCategoryMetadata, w as FFIDConsentError, x as FFIDConsentErrorCode, y as FFIDConsentMergeStrategy, B as FFIDConsentMergeWarning, E as FFIDConsentMergeWarningEvent, F as FFIDConsentResult, I as FFIDConsentSource, a as FFIDConsentState, d as FFIDConsentSyncResult, M as FFIDCookieBanner, N as FFIDCookieBannerClassNames, O as FFIDCookieBannerProps, Q as FFIDCookieLink, R as FFIDCookieLinkProps, f as FFIDCookiePolicy, T as FFIDCookieSettings, U as FFIDCookieSettingsClassNames, V as FFIDCookieSettingsProps, _ as FFID_CONSENT_ERROR_CODES, ae as UseFFIDConsentPreferencesReturn, af as UseFFIDConsentReturn, ag as clearConsentDismissalTimestamp, aj as decodeConsentCookie, al as encodeConsentCookie, an as readConsentCookie, ao as readConsentDismissalTimestamp, aq as useFFIDConsent, ar as useFFIDConsentPreferences, as as writeConsentCookie, at as writeConsentDismissalTimestamp } from './FFIDCookieLink-BJgVcJyw.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { ReactNode, ComponentType, FC } from 'react';
@@ -1111,6 +1111,20 @@ interface RedirectToAuthorizeOptions {
1111
1111
  * regardless of `authMode`.
1112
1112
  */
1113
1113
  screenHint?: typeof SCREEN_HINT_SIGNUP | 'login';
1114
+ /**
1115
+ * OIDC `prompt` to forward to FFID `/oauth/authorize` (#4027).
1116
+ *
1117
+ * - `'select_account'`: forwards `prompt=select_account` so the upstream IdP
1118
+ * (Google) account chooser is shown — used by {@link switchAccount} to enable
1119
+ * RP-initiated account switching after logout (residual upstream sessions would
1120
+ * otherwise auto-re-authenticate the same account).
1121
+ * - `'login'`: forces re-authentication (FFID `/login` is shown even with an
1122
+ * active session).
1123
+ *
1124
+ * Token mode: added to the `/oauth/authorize` query. Cookie mode: forwarded as
1125
+ * `?prompt=…` on the `/login` URL (ignored for the signup screen).
1126
+ */
1127
+ prompt?: FFIDPrompt;
1114
1128
  }
1115
1129
 
1116
1130
  /** Creates an FFID API client instance */
@@ -1120,7 +1134,12 @@ declare function createFFIDClient(config: FFIDConfig): {
1120
1134
  redirectToLogin: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
1121
1135
  redirectToAuthorize: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
1122
1136
  redirectToLogout: (postLogoutRedirectUri?: string) => FFIDRedirectResult;
1123
- getLoginUrl: (redirectUrl?: string) => string;
1137
+ switchAccount: (options?: {
1138
+ organizationId?: string;
1139
+ }) => Promise<FFIDRedirectResult>;
1140
+ getLoginUrl: (redirectUrl?: string, options?: {
1141
+ prompt?: FFIDPrompt;
1142
+ }) => string;
1124
1143
  getLogoutUrl: (postLogoutRedirectUri?: string) => string;
1125
1144
  getSignupUrl: (redirectUrl?: string) => string;
1126
1145
  createError: (code: string, message: string) => FFIDError;
@@ -1375,12 +1394,36 @@ interface UseFFIDReturn {
1375
1394
  * (forwards `screen_hint=signup` in token mode / redirects to `/signup`
1376
1395
  * in cookie mode). `'login'` and `undefined` use the default login flow.
1377
1396
  * See `RedirectToAuthorizeOptions` (#2908 / #2911).
1397
+ * @param options.prompt OIDC `prompt` forwarded to FFID `/oauth/authorize`
1398
+ * (e.g. `'select_account'` to force the upstream account chooser). For account
1399
+ * switching, prefer the dedicated {@link UseFFIDReturn.switchAccount} helper (#4027).
1378
1400
  */
1379
1401
  login: (options?: {
1380
1402
  screenHint?: 'signup' | 'login';
1403
+ prompt?: FFIDPrompt;
1381
1404
  }) => void;
1382
- /** Sign out */
1405
+ /** Sign out (client-side: clears local session via the signout API) */
1383
1406
  logout: () => Promise<void>;
1407
+ /**
1408
+ * Get the FFID SSO logout URL (RP-initiated logout). Includes `client_id` for
1409
+ * `post_logout_redirect_uri` validation. Use for cross-origin browser navigation
1410
+ * that must clear the SSO session cookie (#4027).
1411
+ */
1412
+ getLogoutUrl: (postLogoutRedirectUri?: string) => string;
1413
+ /**
1414
+ * Redirect to the FFID SSO logout endpoint (clears the SSO session cookie via a
1415
+ * top-level browser navigation, so SameSite=Lax cookies are sent). #4027.
1416
+ */
1417
+ redirectToLogout: (postLogoutRedirectUri?: string) => FFIDRedirectResult;
1418
+ /**
1419
+ * Switch / add account: forces the upstream Google account chooser via
1420
+ * `prompt=select_account` so RP-initiated account switching is not silently
1421
+ * re-authenticated against the residual upstream session. Pair with
1422
+ * {@link UseFFIDReturn.redirectToLogout} if an explicit signed-out step is needed (#4027).
1423
+ */
1424
+ switchAccount: (options?: {
1425
+ organizationId?: string;
1426
+ }) => Promise<FFIDRedirectResult>;
1384
1427
  /**
1385
1428
  * Switch current organization.
1386
1429
  * Cookie mode: local state change. Token mode: OAuth re-authorization redirect.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useFFIDContext, useSubscription } from './chunk-C7PURRNI.js';
2
- export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, isBlockedFromUserinfo, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-C7PURRNI.js';
1
+ import { useFFIDContext, useSubscription } from './chunk-HLCHSKAF.js';
2
+ export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, isBlockedFromUserinfo, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-HLCHSKAF.js';
3
3
  export { ALL_DENIED_EXCEPT_NECESSARY, CONSENT_COOKIE_NAME, CONSENT_DISMISSAL_TIMESTAMP_KEY, COOKIE_VERSION, DEFAULT_CONSENT_ERROR_MESSAGES, FFIDAnalyticsProvider, FFIDConsentError, FFIDCookieBanner, FFIDCookieLink, FFIDCookieSettings, FFID_CONSENT_ERROR_CODES, clearConsentDismissalTimestamp, decodeConsentCookie, encodeConsentCookie, readConsentCookie, readConsentDismissalTimestamp, useFFIDConsent, useFFIDConsentPreferences, writeConsentCookie, writeConsentDismissalTimestamp } from './chunk-G7VOX64X.js';
4
4
  import { useEffect, useRef } from 'react';
5
5
  import { jsx, Fragment } from 'react/jsx-runtime';
@@ -1090,7 +1090,7 @@ function createNonContractMethods(deps) {
1090
1090
  }
1091
1091
 
1092
1092
  // src/client/version-check.ts
1093
- var SDK_VERSION = "5.16.2";
1093
+ var SDK_VERSION = "5.17.0";
1094
1094
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
1095
1095
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
1096
1096
  function sdkHeaders() {
@@ -1841,6 +1841,9 @@ function createRedirectMethods(deps) {
1841
1841
  if (options?.screenHint === SCREEN_HINT_SIGNUP) {
1842
1842
  params.set(SCREEN_HINT_PARAM, SCREEN_HINT_SIGNUP);
1843
1843
  }
1844
+ if (options?.prompt) {
1845
+ params.set("prompt", options.prompt);
1846
+ }
1844
1847
  const authorizeUrl = `${baseUrl}${OAUTH_AUTHORIZE_ENDPOINT}?${params.toString()}`;
1845
1848
  logger.debug("Redirecting to authorize:", authorizeUrl);
1846
1849
  recordRedirectAttempt(authorizeKey, now, logger);
@@ -1860,12 +1863,12 @@ function createRedirectMethods(deps) {
1860
1863
  if (authMode === "token") {
1861
1864
  return redirectToAuthorize(options);
1862
1865
  }
1863
- const targetUrl = options?.screenHint === SCREEN_HINT_SIGNUP ? getSignupUrl() : getLoginUrl();
1866
+ const targetUrl = options?.screenHint === SCREEN_HINT_SIGNUP ? getSignupUrl() : getLoginUrl(void 0, options?.prompt ? { prompt: options.prompt } : void 0);
1864
1867
  logger.debug("Redirecting to auth page:", targetUrl);
1865
1868
  window.location.href = targetUrl;
1866
1869
  return { success: true };
1867
1870
  }
1868
- function getLoginUrl(redirectUrl) {
1871
+ function getLoginUrl(redirectUrl, options) {
1869
1872
  let redirect;
1870
1873
  if (redirectUrl != null) {
1871
1874
  redirect = redirectUrl;
@@ -1875,7 +1878,8 @@ function createRedirectMethods(deps) {
1875
1878
  logger.warn("getLoginUrl: SSR \u74B0\u5883\u3067 redirectUrl \u304C\u672A\u6307\u5B9A\u306E\u305F\u3081\u7A7A\u6587\u5B57\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF\u3057\u307E\u3059");
1876
1879
  redirect = "";
1877
1880
  }
1878
- return `${baseUrl}/login?redirect=${encodeURIComponent(redirect)}&service=${encodeURIComponent(serviceCode)}`;
1881
+ const promptSuffix = options?.prompt ? `&prompt=${encodeURIComponent(options.prompt)}` : "";
1882
+ return `${baseUrl}/login?redirect=${encodeURIComponent(redirect)}&service=${encodeURIComponent(serviceCode)}${promptSuffix}`;
1879
1883
  }
1880
1884
  function getSignupUrl(redirectUrl) {
1881
1885
  let redirect;
@@ -1907,7 +1911,10 @@ function createRedirectMethods(deps) {
1907
1911
  window.location.href = logoutUrl;
1908
1912
  return { success: true };
1909
1913
  }
1910
- return { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout };
1914
+ async function switchAccount(options) {
1915
+ return redirectToLogin({ ...options, prompt: "select_account" });
1916
+ }
1917
+ return { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout, switchAccount };
1911
1918
  }
1912
1919
 
1913
1920
  // src/client/redirect-uri.ts
@@ -2806,7 +2813,7 @@ function createFFIDClient(config) {
2806
2813
  }
2807
2814
  return signOutCookie();
2808
2815
  }
2809
- const { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout } = createRedirectMethods({
2816
+ const { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout, switchAccount } = createRedirectMethods({
2810
2817
  authMode,
2811
2818
  baseUrl,
2812
2819
  clientId,
@@ -3000,6 +3007,7 @@ function createFFIDClient(config) {
3000
3007
  redirectToLogin,
3001
3008
  redirectToAuthorize,
3002
3009
  redirectToLogout,
3010
+ switchAccount,
3003
3011
  getLoginUrl,
3004
3012
  getLogoutUrl,
3005
3013
  getSignupUrl,
@@ -1,5 +1,5 @@
1
- import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-CKFxY60u.cjs';
2
- export { f as FFIDAddMemberParams, g as FFIDAddMemberRequest, h as FFIDAddMemberResponse, i as FFIDAssignableMemberRole, j as FFIDCacheConfig, k as FFIDClient, l as FFIDConfig, m as FFIDListMembersResponse, n as FFIDMemberRole, o as FFIDOrganization, p as FFIDOrganizationMember, q as FFIDOtpSendResponse, r as FFIDOtpVerifyResponse, s as FFIDPasswordResetConfirmResponse, t as FFIDPasswordResetResponse, u as FFIDPasswordResetVerifyResponse, v as FFIDProfileCallOptions, w as FFIDRemoveMemberResponse, x as FFIDResetSessionResponse, y as FFIDSubscription, z as FFIDUpdateMemberRoleResponse, A as FFIDUpdateUserProfileRequest, B as FFIDUser, C as FFIDUserProfile, T as TokenData, D as TokenStore, E as createFFIDClient, G as createTokenStore } from '../ffid-client-CKFxY60u.cjs';
1
+ import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-DZEK3tkP.cjs';
2
+ export { f as FFIDAddMemberParams, g as FFIDAddMemberRequest, h as FFIDAddMemberResponse, i as FFIDAssignableMemberRole, j as FFIDCacheConfig, k as FFIDClient, l as FFIDConfig, m as FFIDListMembersResponse, n as FFIDMemberRole, o as FFIDOrganization, p as FFIDOrganizationMember, q as FFIDOtpSendResponse, r as FFIDOtpVerifyResponse, s as FFIDPasswordResetConfirmResponse, t as FFIDPasswordResetResponse, u as FFIDPasswordResetVerifyResponse, v as FFIDProfileCallOptions, w as FFIDRemoveMemberResponse, x as FFIDResetSessionResponse, y as FFIDSubscription, z as FFIDUpdateMemberRoleResponse, A as FFIDUpdateUserProfileRequest, B as FFIDUser, C as FFIDUserProfile, T as TokenData, D as TokenStore, E as createFFIDClient, G as createTokenStore } from '../ffid-client-DZEK3tkP.cjs';
3
3
  export { D as DEFAULT_API_BASE_URL, a as DEFAULT_OAUTH_SCOPES } from '../constants-D61jqRIO.cjs';
4
4
  import { z } from 'zod';
5
5
  import '../types-BeVl-z12.cjs';
@@ -1,5 +1,5 @@
1
- import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-9-lh0G_h.js';
2
- export { f as FFIDAddMemberParams, g as FFIDAddMemberRequest, h as FFIDAddMemberResponse, i as FFIDAssignableMemberRole, j as FFIDCacheConfig, k as FFIDClient, l as FFIDConfig, m as FFIDListMembersResponse, n as FFIDMemberRole, o as FFIDOrganization, p as FFIDOrganizationMember, q as FFIDOtpSendResponse, r as FFIDOtpVerifyResponse, s as FFIDPasswordResetConfirmResponse, t as FFIDPasswordResetResponse, u as FFIDPasswordResetVerifyResponse, v as FFIDProfileCallOptions, w as FFIDRemoveMemberResponse, x as FFIDResetSessionResponse, y as FFIDSubscription, z as FFIDUpdateMemberRoleResponse, A as FFIDUpdateUserProfileRequest, B as FFIDUser, C as FFIDUserProfile, T as TokenData, D as TokenStore, E as createFFIDClient, G as createTokenStore } from '../ffid-client-9-lh0G_h.js';
1
+ import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-BtS84epg.js';
2
+ export { f as FFIDAddMemberParams, g as FFIDAddMemberRequest, h as FFIDAddMemberResponse, i as FFIDAssignableMemberRole, j as FFIDCacheConfig, k as FFIDClient, l as FFIDConfig, m as FFIDListMembersResponse, n as FFIDMemberRole, o as FFIDOrganization, p as FFIDOrganizationMember, q as FFIDOtpSendResponse, r as FFIDOtpVerifyResponse, s as FFIDPasswordResetConfirmResponse, t as FFIDPasswordResetResponse, u as FFIDPasswordResetVerifyResponse, v as FFIDProfileCallOptions, w as FFIDRemoveMemberResponse, x as FFIDResetSessionResponse, y as FFIDSubscription, z as FFIDUpdateMemberRoleResponse, A as FFIDUpdateUserProfileRequest, B as FFIDUser, C as FFIDUserProfile, T as TokenData, D as TokenStore, E as createFFIDClient, G as createTokenStore } from '../ffid-client-BtS84epg.js';
3
3
  export { D as DEFAULT_API_BASE_URL, a as DEFAULT_OAUTH_SCOPES } from '../constants-D61jqRIO.js';
4
4
  import { z } from 'zod';
5
5
  import '../types-BeVl-z12.js';
@@ -1089,7 +1089,7 @@ function createNonContractMethods(deps) {
1089
1089
  }
1090
1090
 
1091
1091
  // src/client/version-check.ts
1092
- var SDK_VERSION = "5.16.2";
1092
+ var SDK_VERSION = "5.17.0";
1093
1093
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
1094
1094
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
1095
1095
  function sdkHeaders() {
@@ -1840,6 +1840,9 @@ function createRedirectMethods(deps) {
1840
1840
  if (options?.screenHint === SCREEN_HINT_SIGNUP) {
1841
1841
  params.set(SCREEN_HINT_PARAM, SCREEN_HINT_SIGNUP);
1842
1842
  }
1843
+ if (options?.prompt) {
1844
+ params.set("prompt", options.prompt);
1845
+ }
1843
1846
  const authorizeUrl = `${baseUrl}${OAUTH_AUTHORIZE_ENDPOINT}?${params.toString()}`;
1844
1847
  logger.debug("Redirecting to authorize:", authorizeUrl);
1845
1848
  recordRedirectAttempt(authorizeKey, now, logger);
@@ -1859,12 +1862,12 @@ function createRedirectMethods(deps) {
1859
1862
  if (authMode === "token") {
1860
1863
  return redirectToAuthorize(options);
1861
1864
  }
1862
- const targetUrl = options?.screenHint === SCREEN_HINT_SIGNUP ? getSignupUrl() : getLoginUrl();
1865
+ const targetUrl = options?.screenHint === SCREEN_HINT_SIGNUP ? getSignupUrl() : getLoginUrl(void 0, options?.prompt ? { prompt: options.prompt } : void 0);
1863
1866
  logger.debug("Redirecting to auth page:", targetUrl);
1864
1867
  window.location.href = targetUrl;
1865
1868
  return { success: true };
1866
1869
  }
1867
- function getLoginUrl(redirectUrl) {
1870
+ function getLoginUrl(redirectUrl, options) {
1868
1871
  let redirect;
1869
1872
  if (redirectUrl != null) {
1870
1873
  redirect = redirectUrl;
@@ -1874,7 +1877,8 @@ function createRedirectMethods(deps) {
1874
1877
  logger.warn("getLoginUrl: SSR \u74B0\u5883\u3067 redirectUrl \u304C\u672A\u6307\u5B9A\u306E\u305F\u3081\u7A7A\u6587\u5B57\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF\u3057\u307E\u3059");
1875
1878
  redirect = "";
1876
1879
  }
1877
- return `${baseUrl}/login?redirect=${encodeURIComponent(redirect)}&service=${encodeURIComponent(serviceCode)}`;
1880
+ const promptSuffix = options?.prompt ? `&prompt=${encodeURIComponent(options.prompt)}` : "";
1881
+ return `${baseUrl}/login?redirect=${encodeURIComponent(redirect)}&service=${encodeURIComponent(serviceCode)}${promptSuffix}`;
1878
1882
  }
1879
1883
  function getSignupUrl(redirectUrl) {
1880
1884
  let redirect;
@@ -1906,7 +1910,10 @@ function createRedirectMethods(deps) {
1906
1910
  window.location.href = logoutUrl;
1907
1911
  return { success: true };
1908
1912
  }
1909
- return { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout };
1913
+ async function switchAccount(options) {
1914
+ return redirectToLogin({ ...options, prompt: "select_account" });
1915
+ }
1916
+ return { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout, switchAccount };
1910
1917
  }
1911
1918
 
1912
1919
  // src/client/redirect-uri.ts
@@ -2805,7 +2812,7 @@ function createFFIDClient(config) {
2805
2812
  }
2806
2813
  return signOutCookie();
2807
2814
  }
2808
- const { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout } = createRedirectMethods({
2815
+ const { redirectToLogin, redirectToAuthorize, getLoginUrl, getSignupUrl, getLogoutUrl, redirectToLogout, switchAccount } = createRedirectMethods({
2809
2816
  authMode,
2810
2817
  baseUrl,
2811
2818
  clientId,
@@ -2999,6 +3006,7 @@ function createFFIDClient(config) {
2999
3006
  redirectToLogin,
3000
3007
  redirectToAuthorize,
3001
3008
  redirectToLogout,
3009
+ switchAccount,
3002
3010
  getLoginUrl,
3003
3011
  getLogoutUrl,
3004
3012
  getSignupUrl,
@@ -1,4 +1,4 @@
1
- import { k as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-CKFxY60u.cjs';
1
+ import { k as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-DZEK3tkP.cjs';
2
2
  import '../../types-BeVl-z12.cjs';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { k as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-9-lh0G_h.js';
1
+ import { k as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-BtS84epg.js';
2
2
  import '../../types-BeVl-z12.js';
3
3
 
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feelflow/ffid-sdk",
3
- "version": "5.16.2",
3
+ "version": "5.17.0",
4
4
  "description": "FeelFlow ID Platform SDK for React/Next.js applications",
5
5
  "keywords": [
6
6
  "feelflow",