@hexclave/next 1.0.125 → 1.0.127
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/{admin-app-impl-Bxad6t8m.d.ts → admin-app-impl-CjCeXtJd.d.ts} +29 -13
- package/dist/admin-app-impl-CjCeXtJd.d.ts.map +1 -0
- package/dist/clickmap/clickmap-core.d.ts +1 -1
- package/dist/clickmap/index.d.ts +1 -1
- package/dist/{client-app-B0cTytS5.d.ts → client-app-jAjrgwSh.d.ts} +34 -6
- package/dist/client-app-jAjrgwSh.d.ts.map +1 -0
- package/dist/{common-B2gkWlXX.d.ts → common-BjAI7WW6.d.ts} +15 -3
- package/dist/common-BjAI7WW6.d.ts.map +1 -0
- package/dist/{common-BK_sydxF.d.ts → common-DWfeER0s.d.ts} +2 -2
- package/dist/{common-BK_sydxF.d.ts.map → common-DWfeER0s.d.ts.map} +1 -1
- package/dist/components/message-cards/predefined-message-card.js +4 -2
- package/dist/components/message-cards/predefined-message-card.js.map +1 -1
- package/dist/components/selected-team-switcher.d.ts +1 -1
- package/dist/components/team-icon.d.ts +1 -1
- package/dist/components/team-switcher.d.ts +1 -1
- package/dist/components/user-button.js +9 -9
- package/dist/components/user-button.js.map +1 -1
- package/dist/components/user-button.test.d.ts +1 -0
- package/dist/components/user-button.test.js +71 -0
- package/dist/components/user-button.test.js.map +1 -0
- package/dist/components-page/account-settings/payments/payments-page.d.ts +1 -1
- package/dist/components-page/account-settings/payments/payments-panel.d.ts +1 -1
- package/dist/components-page/account-settings/settings/sign-out-section.d.ts +1 -1
- package/dist/components-page/account-settings/settings/sign-out-section.d.ts.map +1 -1
- package/dist/components-page/account-settings/settings/sign-out-section.js +4 -1
- package/dist/components-page/account-settings/settings/sign-out-section.js.map +1 -1
- package/dist/components-page/account-settings/teams/leave-team-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-api-keys-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-display-name-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-member-invitation-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-member-list-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-page.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-profile-image-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-profile-user-section.d.ts +1 -1
- package/dist/components-page/hexclave-handler-client.d.ts +1 -1
- package/dist/components-page/hexclave-handler.d.ts +1 -1
- package/dist/components-page/onboarding.js +15 -13
- package/dist/components-page/onboarding.js.map +1 -1
- package/dist/components-page/onboarding.test.js +2 -1
- package/dist/components-page/onboarding.test.js.map +1 -1
- package/dist/dev-tool/dev-tool-core.d.ts +1 -1
- package/dist/dev-tool/index.d.ts +1 -1
- package/dist/esm/components/message-cards/predefined-message-card.js +4 -2
- package/dist/esm/components/message-cards/predefined-message-card.js.map +1 -1
- package/dist/esm/components/user-button.js +9 -9
- package/dist/esm/components/user-button.js.map +1 -1
- package/dist/esm/components/user-button.test.d.ts +1 -0
- package/dist/esm/components/user-button.test.js +70 -0
- package/dist/esm/components/user-button.test.js.map +1 -0
- package/dist/esm/components-page/account-settings/settings/sign-out-section.d.ts +1 -1
- package/dist/esm/components-page/account-settings/settings/sign-out-section.d.ts.map +1 -1
- package/dist/esm/components-page/account-settings/settings/sign-out-section.js +4 -1
- package/dist/esm/components-page/account-settings/settings/sign-out-section.js.map +1 -1
- package/dist/esm/components-page/onboarding.js +15 -13
- package/dist/esm/components-page/onboarding.js.map +1 -1
- package/dist/esm/components-page/onboarding.test.js +2 -1
- package/dist/esm/components-page/onboarding.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +4 -4
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +18 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.external-token-store.test.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.external-token-store.test.js +382 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.external-token-store.test.js.map +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.init-analytics.test.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.init-analytics.test.js +66 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.init-analytics.test.js.map +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +66 -14
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/common.js +2 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/external-token-store-session-adapter.d.ts +31 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/external-token-store-session-adapter.d.ts.map +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/external-token-store-session-adapter.js +115 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/external-token-store-session-adapter.js.map +1 -0
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts +16 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
- package/dist/esm/lib/hexclave-app/common.d.ts +14 -2
- package/dist/esm/lib/hexclave-app/common.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/common.js +17 -1
- package/dist/esm/lib/hexclave-app/common.js.map +1 -1
- package/dist/esm/lib/hexclave-app/index.d.ts +2 -2
- package/dist/esm/lib/hexclave-app/index.js +2 -2
- package/dist/esm/lib/hexclave-app/users/index.d.ts +14 -1
- package/dist/esm/lib/hexclave-app/users/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/users/index.js.map +1 -1
- package/dist/{hexclave-provider-w8nX8KDv.d.ts → hexclave-provider-Br8j6WHN.d.ts} +2 -2
- package/dist/{hexclave-provider-w8nX8KDv.d.ts.map → hexclave-provider-Br8j6WHN.d.ts.map} +1 -1
- package/dist/{hooks-nqzRtl9S.d.ts → hooks-DyC8t1Sh.d.ts} +3 -3
- package/dist/{hooks-nqzRtl9S.d.ts.map → hooks-DyC8t1Sh.d.ts.map} +1 -1
- package/dist/{index-DbiyXho6.d.ts → index-CQ4kC6Cu.d.ts} +2 -2
- package/dist/{index-DbiyXho6.d.ts.map → index-CQ4kC6Cu.d.ts.map} +1 -1
- package/dist/{index-BDzsJvkD.d.ts → index-CWaynElx.d.ts} +3 -3
- package/dist/{index-BDzsJvkD.d.ts.map → index-CWaynElx.d.ts.map} +1 -1
- package/dist/{index-BSr2pd22.d.ts → index-FsS-NA9c.d.ts} +2 -2
- package/dist/{index-BSr2pd22.d.ts.map → index-FsS-NA9c.d.ts.map} +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.external-token-store.test.d.ts +1 -0
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.external-token-store.test.js +381 -0
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.external-token-store.test.js.map +1 -0
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.init-analytics.test.d.ts +1 -0
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.init-analytics.test.js +65 -0
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.init-analytics.test.js.map +1 -0
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +65 -13
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/common.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/common.js +2 -2
- package/dist/lib/hexclave-app/apps/implementations/external-token-store-session-adapter.d.ts +31 -0
- package/dist/lib/hexclave-app/apps/implementations/external-token-store-session-adapter.d.ts.map +1 -0
- package/dist/lib/hexclave-app/apps/implementations/external-token-store-session-adapter.js +117 -0
- package/dist/lib/hexclave-app/apps/implementations/external-token-store-session-adapter.js.map +1 -0
- package/dist/lib/hexclave-app/apps/implementations/index.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/index.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/server-app.d.ts +1 -1
- package/dist/lib/hexclave-app/common.d.ts +2 -2
- package/dist/lib/hexclave-app/common.js +19 -0
- package/dist/lib/hexclave-app/common.js.map +1 -1
- package/dist/lib/hexclave-app/customers/index.d.ts +1 -1
- package/dist/lib/hexclave-app/data-vault/index.d.ts +1 -1
- package/dist/lib/hexclave-app/index.d.ts +4 -4
- package/dist/lib/hexclave-app/index.js +18 -0
- package/dist/lib/hexclave-app/projects/index.d.ts +1 -1
- package/dist/lib/hexclave-app/teams/index.d.ts +1 -1
- package/dist/lib/hexclave-app/url-targets.d.ts +1 -1
- package/dist/lib/hexclave-app/users/index.d.ts +1 -1
- package/dist/lib/hexclave-app/users/index.js.map +1 -1
- package/dist/lib/hooks.d.ts +1 -1
- package/dist/providers/hexclave-context.d.ts +1 -1
- package/dist/providers/hexclave-provider-client.d.ts +1 -1
- package/dist/providers/hexclave-provider.d.ts +1 -1
- package/dist/pushed-config-error-overlay/index.d.ts +1 -1
- package/dist/{redirect-page-urls-ofcg3AYr.d.ts → redirect-page-urls-CnGvn0UJ.d.ts} +2 -2
- package/dist/{redirect-page-urls-ofcg3AYr.d.ts.map → redirect-page-urls-CnGvn0UJ.d.ts.map} +1 -1
- package/dist/tanstack-start-server-context.d.ts.map +1 -1
- package/dist/{url-targets-CWO0mjTr.d.ts → url-targets-DbhzuQtY.d.ts} +2 -2
- package/dist/{url-targets-CWO0mjTr.d.ts.map → url-targets-DbhzuQtY.d.ts.map} +1 -1
- package/package.json +4 -4
- package/src/components/message-cards/predefined-message-card.tsx +4 -2
- package/src/components/user-button.test.tsx +87 -0
- package/src/components/user-button.tsx +9 -9
- package/src/components-page/account-settings/settings/sign-out-section.tsx +9 -1
- package/src/components-page/onboarding.test.tsx +1 -0
- package/src/components-page/onboarding.tsx +16 -13
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.external-token-store.test.ts +425 -0
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.init-analytics.test.ts +79 -0
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.ts +124 -13
- package/src/lib/hexclave-app/apps/implementations/external-token-store-session-adapter.ts +190 -0
- package/src/lib/hexclave-app/apps/interfaces/client-app.ts +17 -0
- package/src/lib/hexclave-app/common.ts +33 -0
- package/src/lib/hexclave-app/index.ts +4 -0
- package/src/lib/hexclave-app/users/index.ts +13 -1
- package/dist/admin-app-impl-Bxad6t8m.d.ts.map +0 -1
- package/dist/client-app-B0cTytS5.d.ts.map +0 -1
- package/dist/common-B2gkWlXX.d.ts.map +0 -1
|
@@ -67,12 +67,13 @@ import { StackClientApp, StackClientAppConstructorOptions, StackClientAppJson }
|
|
|
67
67
|
import { _HexclaveAdminAppImplIncomplete } from "./admin-app-impl";
|
|
68
68
|
import { TokenObject, clientVersion, createCache, createCacheBySession, createEmptyTokenStore, getAnalyticsBaseUrl, getDefaultExtraRequestHeaders, getDefaultProjectId, getDefaultPublishableClientKey, getUrls, resolveApiUrls, resolveConstructorOptions } from "./common";
|
|
69
69
|
import { EventTracker } from "./event-tracker";
|
|
70
|
+
import { ExternalTokenStoreSessionAdapter, isExternalTokenStore } from "./external-token-store-session-adapter";
|
|
70
71
|
import { augmentUrlWithPersistedRedirectBackState, getRawAfterAuthReturnTo, saveRedirectBackStateFromUrl } from "./redirect-back-state";
|
|
71
72
|
import { recordRedirectAndThrowIfLoopDetected } from "./redirect-loop-breaker";
|
|
72
73
|
import type { CrossDomainHandoffParams } from "./redirect-page-urls";
|
|
73
74
|
import { crossDomainAuthQueryParams, getCrossDomainHandoffParamsFromCurrentUrl, planRedirectToHandler } from "./redirect-page-urls";
|
|
74
75
|
import { subscribeSessionRefresh } from "./session-refresh-subscription";
|
|
75
|
-
import { AnalyticsOptions, SessionRecorder, analyticsOptionsFromJson, analyticsOptionsToJson, getSessionReplayOptions } from "./session-replay";
|
|
76
|
+
import { AnalyticsOptions, SessionRecorder, analyticsOptionsFromJson, analyticsOptionsToJson, getSessionReplayOptions, isAnalyticsNotEnabledError } from "./session-replay";
|
|
76
77
|
|
|
77
78
|
export function stripBrowserActionQueryParam() {
|
|
78
79
|
let stripAttemptsRemaining = 20;
|
|
@@ -212,6 +213,10 @@ function throwSetupError(error: HexclaveSetupError): never {
|
|
|
212
213
|
throw error;
|
|
213
214
|
}
|
|
214
215
|
|
|
216
|
+
function createAnalyticsAppDisabledOnProjectError(): Error {
|
|
217
|
+
return new Error("initAnalytics() was called, but the Analytics app is not enabled on this Hexclave project, so the backend rejects all analytics uploads. Enable the Analytics app in the Hexclave dashboard (or in hexclave.config.ts), or remove the initAnalytics() call if this is intentional.");
|
|
218
|
+
}
|
|
219
|
+
|
|
215
220
|
function getRedirectHelperInstruction(handlerName: string): string {
|
|
216
221
|
if (handlerName === "handler") {
|
|
217
222
|
return "Use a page-specific redirect helper such as app.redirectToSignIn() instead.";
|
|
@@ -370,7 +375,10 @@ export class _HexclaveClientAppImplIncomplete<HasTokenStore extends boolean, Pro
|
|
|
370
375
|
private readonly _analyticsOptions: AnalyticsOptions | undefined;
|
|
371
376
|
private _sessionRecorder: SessionRecorder | null = null;
|
|
372
377
|
private _eventTracker: EventTracker | null = null;
|
|
378
|
+
private _initAnalyticsCalled = false;
|
|
379
|
+
private _analyticsAppDisabledOnProject = false;
|
|
373
380
|
private _pendingSignOut: Promise<void> | null = null;
|
|
381
|
+
private readonly _externalTokenStoreSessionAdapter: ExternalTokenStoreSessionAdapter;
|
|
374
382
|
|
|
375
383
|
private __DEMO_ENABLE_SLIGHT_FETCH_DELAY = false;
|
|
376
384
|
private readonly _ownedAdminApps = new DependenciesMap<[InternalSession, string], _HexclaveAdminAppImplIncomplete<false, string>>();
|
|
@@ -794,6 +802,13 @@ export class _HexclaveClientAppImplIncomplete<HasTokenStore extends boolean, Pro
|
|
|
794
802
|
}
|
|
795
803
|
});
|
|
796
804
|
}
|
|
805
|
+
this._externalTokenStoreSessionAdapter = new ExternalTokenStoreSessionAdapter(
|
|
806
|
+
(sessionOptions) => this._interface.createSession(sessionOptions),
|
|
807
|
+
async (providerId, token) => {
|
|
808
|
+
const exchange = await this._interface.exchangeExternalAuthToken(providerId, token);
|
|
809
|
+
return Result.orThrow(exchange).accessToken;
|
|
810
|
+
},
|
|
811
|
+
);
|
|
797
812
|
|
|
798
813
|
this._tokenStoreInit = resolvedOptions.tokenStore;
|
|
799
814
|
this._redirectMethod = resolvedOptions.redirectMethod || (isBrowserLike() ? "window" : "none");
|
|
@@ -836,24 +851,28 @@ export class _HexclaveClientAppImplIncomplete<HasTokenStore extends boolean, Pro
|
|
|
836
851
|
return anonUser._internalSession;
|
|
837
852
|
};
|
|
838
853
|
|
|
839
|
-
const
|
|
854
|
+
const recordsAnalytics = this._getAnalyticsDisabledReason() == null && isBrowserLike();
|
|
840
855
|
|
|
841
856
|
const sessionReplayOptions = getSessionReplayOptions(this._analyticsOptions);
|
|
842
|
-
if (
|
|
857
|
+
if (recordsAnalytics && sessionReplayOptions.enabled) {
|
|
843
858
|
this._sessionRecorder = new SessionRecorder({
|
|
844
859
|
projectId: this.projectId,
|
|
845
860
|
sendBatch: async (body, opts) => {
|
|
846
|
-
return
|
|
861
|
+
return this._handleAnalyticsUploadResult(
|
|
862
|
+
await this._interface.sendSessionReplayBatch(body, await getAnalyticsSession(), opts),
|
|
863
|
+
);
|
|
847
864
|
},
|
|
848
865
|
}, sessionReplayOptions);
|
|
849
866
|
this._sessionRecorder.start();
|
|
850
867
|
}
|
|
851
868
|
|
|
852
|
-
if (
|
|
869
|
+
if (recordsAnalytics) {
|
|
853
870
|
this._eventTracker = new EventTracker({
|
|
854
871
|
projectId: this.projectId,
|
|
855
872
|
sendBatch: async (body, opts) => {
|
|
856
|
-
return
|
|
873
|
+
return this._handleAnalyticsUploadResult(
|
|
874
|
+
await this._interface.sendAnalyticsEventBatch(body, await getAnalyticsSession(), opts),
|
|
875
|
+
);
|
|
857
876
|
},
|
|
858
877
|
});
|
|
859
878
|
this._eventTracker.start();
|
|
@@ -1731,6 +1750,13 @@ export class _HexclaveClientAppImplIncomplete<HasTokenStore extends boolean, Pro
|
|
|
1731
1750
|
default: {
|
|
1732
1751
|
if (tokenStoreInit === null) {
|
|
1733
1752
|
return createEmptyTokenStore();
|
|
1753
|
+
} else if (typeof tokenStoreInit === "object" && isExternalTokenStore(tokenStoreInit)) {
|
|
1754
|
+
return this._externalTokenStoreSessionAdapter.getOrCreateTokenStore(tokenStoreInit, (store, previousSessionKey) => {
|
|
1755
|
+
this._sessionsByTokenStoreAndSessionKey
|
|
1756
|
+
.get(store)
|
|
1757
|
+
?.get(previousSessionKey)
|
|
1758
|
+
?.suggestAccessTokenExpired();
|
|
1759
|
+
});
|
|
1734
1760
|
} else if (typeof tokenStoreInit === "object" && "headers" in tokenStoreInit) {
|
|
1735
1761
|
if (this._requestTokenStores.has(tokenStoreInit)) return this._requestTokenStores.get(tokenStoreInit)!;
|
|
1736
1762
|
|
|
@@ -1799,28 +1825,29 @@ export class _HexclaveClientAppImplIncomplete<HasTokenStore extends boolean, Pro
|
|
|
1799
1825
|
* - So different token stores are separated and don't leak information between each other, eg. if the same user sends two requests to the same server they should get a different session object
|
|
1800
1826
|
*/
|
|
1801
1827
|
private _sessionsByTokenStoreAndSessionKey = new WeakMap<Store<TokenObject>, Map<string, InternalSession>>();
|
|
1828
|
+
|
|
1829
|
+
private _getSessionKeyForTokenStore(tokenStore: Store<TokenObject>, tokenObj: TokenObject): string {
|
|
1830
|
+
return this._externalTokenStoreSessionAdapter.getSessionKey(tokenStore, tokenObj);
|
|
1831
|
+
}
|
|
1802
1832
|
/**
|
|
1803
1833
|
* @param overrideTokenObj The tokens to build the session for, if they haven't been written to the token store yet
|
|
1804
1834
|
* (so we can warm a sign-in's session before the token store publishes it).
|
|
1805
1835
|
*/
|
|
1806
1836
|
protected _getSessionFromTokenStore(tokenStore: Store<TokenObject>, overrideTokenObj?: TokenObject): InternalSession {
|
|
1807
1837
|
const tokenObj = overrideTokenObj ?? tokenStore.get();
|
|
1808
|
-
const sessionKey =
|
|
1838
|
+
const sessionKey = this._getSessionKeyForTokenStore(tokenStore, tokenObj);
|
|
1809
1839
|
const existing = sessionKey ? this._sessionsByTokenStoreAndSessionKey.get(tokenStore)?.get(sessionKey) : null;
|
|
1810
1840
|
if (existing) return existing;
|
|
1811
1841
|
|
|
1812
|
-
const session = this.
|
|
1813
|
-
refreshToken: tokenObj.refreshToken,
|
|
1814
|
-
accessToken: tokenObj.accessToken,
|
|
1815
|
-
});
|
|
1842
|
+
const session = this._externalTokenStoreSessionAdapter.createSessionForTokenStore(tokenStore, tokenObj, sessionKey);
|
|
1816
1843
|
session.onAccessTokenChange((newAccessToken) => {
|
|
1817
|
-
tokenStore.update((old) =>
|
|
1844
|
+
tokenStore.update((old) => this._getSessionKeyForTokenStore(tokenStore, old) === sessionKey ? {
|
|
1818
1845
|
...old,
|
|
1819
1846
|
accessToken: newAccessToken?.token ?? null
|
|
1820
1847
|
} : old);
|
|
1821
1848
|
});
|
|
1822
1849
|
session.onInvalidate(() => {
|
|
1823
|
-
tokenStore.update((old) =>
|
|
1850
|
+
tokenStore.update((old) => this._getSessionKeyForTokenStore(tokenStore, old) === sessionKey ? {
|
|
1824
1851
|
...old,
|
|
1825
1852
|
accessToken: null,
|
|
1826
1853
|
refreshToken: null,
|
|
@@ -1862,6 +1889,11 @@ export class _HexclaveClientAppImplIncomplete<HasTokenStore extends boolean, Pro
|
|
|
1862
1889
|
if (!("accessToken" in tokens) || !("refreshToken" in tokens)) {
|
|
1863
1890
|
throw new HexclaveAssertionError("Invalid tokens object; can't sign in with this", { tokens });
|
|
1864
1891
|
}
|
|
1892
|
+
// An external token store keys its session by the provider's session, so Hexclave refresh tokens from a
|
|
1893
|
+
// first-party sign-in would be written into (and then silently replaced by) the provider's session.
|
|
1894
|
+
if (this.isExternalAuthApp()) {
|
|
1895
|
+
throw new Error("This app authenticates through an external provider and cannot sign in with Hexclave tokens. Sign in through the provider instead.");
|
|
1896
|
+
}
|
|
1865
1897
|
const attemptId = ++this._signInAttemptCounter;
|
|
1866
1898
|
const tokenStore = this._getOrCreateTokenStore(await this._createCookieHelper());
|
|
1867
1899
|
|
|
@@ -2371,6 +2403,7 @@ export class _HexclaveClientAppImplIncomplete<HasTokenStore extends boolean, Pro
|
|
|
2371
2403
|
emailAuthEnabled: crud.auth_with_email,
|
|
2372
2404
|
otpAuthEnabled: crud.otp_auth_enabled,
|
|
2373
2405
|
oauthProviders: crud.oauth_providers,
|
|
2406
|
+
externalAuthProviders: crud.external_auth_providers,
|
|
2374
2407
|
passkeyAuthEnabled: crud.passkey_auth_enabled,
|
|
2375
2408
|
isMultiFactorRequired: crud.requires_totp_mfa,
|
|
2376
2409
|
isAnonymous: crud.is_anonymous,
|
|
@@ -3529,6 +3562,69 @@ export class _HexclaveClientAppImplIncomplete<HasTokenStore extends boolean, Pro
|
|
|
3529
3562
|
return crud && this._currentUserFromCrud(crud, session);
|
|
3530
3563
|
}
|
|
3531
3564
|
|
|
3565
|
+
isExternalAuthApp(): boolean {
|
|
3566
|
+
return typeof this._tokenStoreInit === "object"
|
|
3567
|
+
&& this._tokenStoreInit != null
|
|
3568
|
+
&& isExternalTokenStore(this._tokenStoreInit);
|
|
3569
|
+
}
|
|
3570
|
+
|
|
3571
|
+
initAnalytics(): void {
|
|
3572
|
+
// This doesn't start anything: the constructor already starts analytics capture (see
|
|
3573
|
+
// _initializeAutomaticSideEffects). Pages that never import the module constructing the client app record no
|
|
3574
|
+
// analytics, which is easy to miss when the app is only imported where auth is used. Having a dedicated function
|
|
3575
|
+
// to call on every tracked page makes that import explicit, and gives setup docs and AI prompts a concrete step
|
|
3576
|
+
// to point at. Since the caller has thereby declared that they expect analytics, we fail loudly whenever we know
|
|
3577
|
+
// analytics won't be recorded.
|
|
3578
|
+
this._initAnalyticsCalled = true;
|
|
3579
|
+
|
|
3580
|
+
const disabledReason = this._getAnalyticsDisabledReason();
|
|
3581
|
+
if (disabledReason != null) {
|
|
3582
|
+
throw new Error(`initAnalytics() was called, but this Hexclave app will not record analytics because ${disabledReason}. Remove the initAnalytics() call if this is intentional.`);
|
|
3583
|
+
}
|
|
3584
|
+
if (this._analyticsAppDisabledOnProject) {
|
|
3585
|
+
throw createAnalyticsAppDisabledOnProjectError();
|
|
3586
|
+
}
|
|
3587
|
+
|
|
3588
|
+
// Outside the browser (eg. during SSR of a client component), analytics are never recorded, but the same module
|
|
3589
|
+
// runs again in the browser where they are, so this isn't an error.
|
|
3590
|
+
if (isBrowserLike() && this._eventTracker == null) {
|
|
3591
|
+
throw new HexclaveAssertionError("initAnalytics() was called in the browser and _getAnalyticsDisabledReason() returned null, but the constructor did not start the event tracker. The two must agree on when analytics are recorded.");
|
|
3592
|
+
}
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
/**
|
|
3596
|
+
* Returns why this app will never record analytics, or null if it records them whenever it runs in a browser. The
|
|
3597
|
+
* constructor and initAnalytics() both use this, so that the conditions under which analytics start and the
|
|
3598
|
+
* conditions under which initAnalytics() throws can't drift apart.
|
|
3599
|
+
*
|
|
3600
|
+
* Whether the Analytics app is enabled on the project is not part of this, as the client only learns that once the
|
|
3601
|
+
* backend rejects an upload; see _handleAnalyticsUploadResult.
|
|
3602
|
+
*/
|
|
3603
|
+
private _getAnalyticsDisabledReason(): string | null {
|
|
3604
|
+
if (this._analyticsOptions?.enabled === false) {
|
|
3605
|
+
return "the `analytics.enabled` constructor option is set to false";
|
|
3606
|
+
}
|
|
3607
|
+
if (this._options.automaticSideEffects === false) {
|
|
3608
|
+
return "the `automaticSideEffects` constructor option is set to false, which also disables analytics";
|
|
3609
|
+
}
|
|
3610
|
+
if (!this._hasPersistentTokenStore()) {
|
|
3611
|
+
return "the `tokenStore` constructor option is null; analytics require a persistent token store such as \"cookie\" (or \"nextjs-cookie\" in Next.js)";
|
|
3612
|
+
}
|
|
3613
|
+
return null;
|
|
3614
|
+
}
|
|
3615
|
+
|
|
3616
|
+
private _handleAnalyticsUploadResult(result: Result<Response, Error>): Result<Response, Error> {
|
|
3617
|
+
if (result.status === "error" && isAnalyticsNotEnabledError(result.error) && !this._analyticsAppDisabledOnProject) {
|
|
3618
|
+
this._analyticsAppDisabledOnProject = true;
|
|
3619
|
+
// initAnalytics() usually runs at module load, long before the first upload, so it can't throw this itself. If
|
|
3620
|
+
// it gets called after this point instead, it throws synchronously (see initAnalytics()).
|
|
3621
|
+
if (this._initAnalyticsCalled) {
|
|
3622
|
+
captureError("initAnalytics", createAnalyticsAppDisabledOnProjectError());
|
|
3623
|
+
}
|
|
3624
|
+
}
|
|
3625
|
+
return result;
|
|
3626
|
+
}
|
|
3627
|
+
|
|
3532
3628
|
useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'redirect' }): ProjectCurrentUser<ProjectId>;
|
|
3533
3629
|
useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'throw' }): ProjectCurrentUser<ProjectId>;
|
|
3534
3630
|
useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'anonymous' }): ProjectCurrentUser<ProjectId>;
|
|
@@ -3612,6 +3708,7 @@ export class _HexclaveClientAppImplIncomplete<HasTokenStore extends boolean, Pro
|
|
|
3612
3708
|
primaryEmail: accessToken.payload.email,
|
|
3613
3709
|
displayName: accessToken.payload.name,
|
|
3614
3710
|
primaryEmailVerified: accessToken.payload.email_verified,
|
|
3711
|
+
selectedTeamId: accessToken.payload.selected_team_id,
|
|
3615
3712
|
isAnonymous,
|
|
3616
3713
|
isMultiFactorRequired: accessToken.payload.requires_totp_mfa,
|
|
3617
3714
|
isRestricted: accessToken.payload.is_restricted,
|
|
@@ -3624,11 +3721,16 @@ export class _HexclaveClientAppImplIncomplete<HasTokenStore extends boolean, Pro
|
|
|
3624
3721
|
if (!auth) {
|
|
3625
3722
|
return null;
|
|
3626
3723
|
}
|
|
3724
|
+
const selectedTeamId = auth.selected_team_id ?? null;
|
|
3725
|
+
if (selectedTeamId !== null && typeof selectedTeamId !== "string") {
|
|
3726
|
+
throw new HexclaveAssertionError("Expected the Convex selected_team_id claim to be a string or null.");
|
|
3727
|
+
}
|
|
3627
3728
|
return {
|
|
3628
3729
|
id: auth.subject,
|
|
3629
3730
|
displayName: auth.name ?? null,
|
|
3630
3731
|
primaryEmail: auth.email ?? null,
|
|
3631
3732
|
primaryEmailVerified: auth.email_verified as boolean,
|
|
3733
|
+
selectedTeamId,
|
|
3632
3734
|
isAnonymous: auth.is_anonymous as boolean,
|
|
3633
3735
|
isMultiFactorRequired: auth.requires_totp_mfa as boolean,
|
|
3634
3736
|
isRestricted: auth.is_restricted as boolean,
|
|
@@ -4203,6 +4305,12 @@ export class _HexclaveClientAppImplIncomplete<HasTokenStore extends boolean, Pro
|
|
|
4203
4305
|
const signOutOperation = (async () => {
|
|
4204
4306
|
// Preserve the old behavior of serializing concurrent sign-outs without coupling them to unrelated stores.
|
|
4205
4307
|
await previousSignOut;
|
|
4308
|
+
const externalTokenStore = this._externalTokenStoreSessionAdapter.getExternalTokenStoreForSession(session);
|
|
4309
|
+
if (externalTokenStore != null) {
|
|
4310
|
+
throw new HexclaveAssertionError(
|
|
4311
|
+
`Cannot sign out an externally authenticated session through Hexclave. Sign out through the ${externalTokenStore.providerId} provider instead.`,
|
|
4312
|
+
);
|
|
4313
|
+
}
|
|
4206
4314
|
await this._interface.signOut(session);
|
|
4207
4315
|
if (options?.redirectUrl) {
|
|
4208
4316
|
await this._redirectTo({ url: options.redirectUrl, replace: true });
|
|
@@ -4421,6 +4529,9 @@ export class _HexclaveClientAppImplIncomplete<HasTokenStore extends boolean, Pro
|
|
|
4421
4529
|
if (typeof this._redirectMethod !== "string") {
|
|
4422
4530
|
throw new HexclaveAssertionError("Cannot serialize to JSON from an application with a non-string redirect method");
|
|
4423
4531
|
}
|
|
4532
|
+
if (typeof this._tokenStoreInit === "object" && this._tokenStoreInit != null && isExternalTokenStore(this._tokenStoreInit)) {
|
|
4533
|
+
throw new HexclaveAssertionError("Cannot serialize an app with an external token store because its callbacks are not serializable. Construct this app in the client runtime instead.");
|
|
4534
|
+
}
|
|
4424
4535
|
|
|
4425
4536
|
const publishableClientKey = "publishableClientKey" in this._interface.options
|
|
4426
4537
|
? this._interface.options.publishableClientKey
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
|
|
2
|
+
//===========================================
|
|
3
|
+
// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template
|
|
4
|
+
//===========================================
|
|
5
|
+
import { KnownErrors } from "@hexclave/shared";
|
|
6
|
+
import type { ExternalAuthProviderId } from "@hexclave/shared/dist/interface/external-auth";
|
|
7
|
+
import { AccessToken, InternalSession } from "@hexclave/shared/dist/sessions";
|
|
8
|
+
import { throwErr } from "@hexclave/shared/dist/utils/errors";
|
|
9
|
+
import { Store } from "@hexclave/shared/dist/utils/stores";
|
|
10
|
+
import type { ExternalTokenStore } from "../../common";
|
|
11
|
+
import { createEmptyTokenStore, type TokenObject } from "./common";
|
|
12
|
+
|
|
13
|
+
type ExternalTokenStoreState = {
|
|
14
|
+
generation: number,
|
|
15
|
+
providerSessionId: string | null | undefined,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type SessionOptions = {
|
|
19
|
+
refreshToken: string | null,
|
|
20
|
+
accessToken?: string | null,
|
|
21
|
+
sessionKey?: string,
|
|
22
|
+
refreshAccessTokenWithoutRefreshTokenCallback?: () => Promise<AccessToken | null>,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function isExternalTokenStore(value: object): value is ExternalTokenStore {
|
|
26
|
+
return "type" in value && value.type === "external";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export class ExternalTokenStoreSessionAdapter {
|
|
30
|
+
private readonly storesByExternalTokenStore = new WeakMap<ExternalTokenStore, Store<TokenObject>>();
|
|
31
|
+
private readonly externalTokenStoresByStore = new WeakMap<Store<TokenObject>, ExternalTokenStore>();
|
|
32
|
+
private readonly externalTokenStoresBySession = new WeakMap<InternalSession, ExternalTokenStore>();
|
|
33
|
+
private readonly states = new WeakMap<ExternalTokenStore, ExternalTokenStoreState>();
|
|
34
|
+
|
|
35
|
+
constructor(
|
|
36
|
+
private readonly createSession: (options: SessionOptions) => InternalSession,
|
|
37
|
+
private readonly exchangeToken: (providerId: ExternalAuthProviderId, token: string) => Promise<string>,
|
|
38
|
+
) {}
|
|
39
|
+
|
|
40
|
+
getOrCreateTokenStore(
|
|
41
|
+
externalTokenStore: ExternalTokenStore,
|
|
42
|
+
onProviderChange: (store: Store<TokenObject>, previousSessionKey: string) => void,
|
|
43
|
+
): Store<TokenObject> {
|
|
44
|
+
const existing = this.storesByExternalTokenStore.get(externalTokenStore);
|
|
45
|
+
if (existing != null) {
|
|
46
|
+
return existing;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const store = createEmptyTokenStore();
|
|
50
|
+
this.storesByExternalTokenStore.set(externalTokenStore, store);
|
|
51
|
+
this.externalTokenStoresByStore.set(store, externalTokenStore);
|
|
52
|
+
this.states.set(externalTokenStore, {
|
|
53
|
+
generation: 0,
|
|
54
|
+
providerSessionId: externalTokenStore.getSessionId?.(),
|
|
55
|
+
});
|
|
56
|
+
externalTokenStore.subscribe?.(() => {
|
|
57
|
+
const state = this.states.get(externalTokenStore) ?? throwErr("External token store state was not initialized");
|
|
58
|
+
// Derive the previous session's key from the recorded state, not from a live getSessionId()
|
|
59
|
+
// read: by the time this notification fires, the provider has already switched sessions, so a
|
|
60
|
+
// live read would compute the *new* key and the expiry hint would target the wrong session.
|
|
61
|
+
const previousSessionKey = this.buildSessionKey(externalTokenStore, state);
|
|
62
|
+
const providerSessionId = externalTokenStore.getSessionId?.();
|
|
63
|
+
if (externalTokenStore.getSessionId == null || providerSessionId !== state.providerSessionId) {
|
|
64
|
+
state.generation += 1;
|
|
65
|
+
state.providerSessionId = providerSessionId;
|
|
66
|
+
}
|
|
67
|
+
onProviderChange(store, previousSessionKey);
|
|
68
|
+
store.set({ accessToken: null, refreshToken: null });
|
|
69
|
+
});
|
|
70
|
+
return store;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
getSessionKey(tokenStore: Store<TokenObject>, tokenObject: TokenObject): string {
|
|
74
|
+
const externalTokenStore = this.externalTokenStoresByStore.get(tokenStore);
|
|
75
|
+
if (externalTokenStore == null) {
|
|
76
|
+
return InternalSession.calculateSessionKey(tokenObject);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const state = this.states.get(externalTokenStore) ?? throwErr("External token store state was not initialized");
|
|
80
|
+
// Read the provider session id live (instead of from state) so a session switch is reflected
|
|
81
|
+
// immediately, even before the store's subscribe notification has fired.
|
|
82
|
+
return this.buildSessionKey(externalTokenStore, {
|
|
83
|
+
generation: state.generation,
|
|
84
|
+
providerSessionId: externalTokenStore.getSessionId?.(),
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private buildSessionKey(externalTokenStore: ExternalTokenStore, state: ExternalTokenStoreState): string {
|
|
89
|
+
if (externalTokenStore.getSessionId == null) {
|
|
90
|
+
return `external-${externalTokenStore.providerId}-${state.generation}`;
|
|
91
|
+
}
|
|
92
|
+
return state.providerSessionId == null
|
|
93
|
+
? "not-logged-in"
|
|
94
|
+
: `external-${externalTokenStore.providerId}-${state.providerSessionId}`;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
createSessionForTokenStore(
|
|
98
|
+
tokenStore: Store<TokenObject>,
|
|
99
|
+
tokenObject: TokenObject,
|
|
100
|
+
sessionKey: string,
|
|
101
|
+
): InternalSession {
|
|
102
|
+
const externalTokenStore = this.externalTokenStoresByStore.get(tokenStore);
|
|
103
|
+
let session: InternalSession;
|
|
104
|
+
if (externalTokenStore == null) {
|
|
105
|
+
session = this.createSession({
|
|
106
|
+
refreshToken: tokenObject.refreshToken,
|
|
107
|
+
accessToken: tokenObject.accessToken,
|
|
108
|
+
});
|
|
109
|
+
} else if (sessionKey === "not-logged-in") {
|
|
110
|
+
// A provider can clear its session before its token store notification arrives; never let
|
|
111
|
+
// that transiently expose the previous provider session's cached Hexclave token.
|
|
112
|
+
session = this.createSession({
|
|
113
|
+
refreshToken: null,
|
|
114
|
+
accessToken: null,
|
|
115
|
+
sessionKey,
|
|
116
|
+
});
|
|
117
|
+
} else {
|
|
118
|
+
session = this.createSession({
|
|
119
|
+
refreshToken: null,
|
|
120
|
+
accessToken: tokenObject.accessToken,
|
|
121
|
+
sessionKey,
|
|
122
|
+
refreshAccessTokenWithoutRefreshTokenCallback: async () => {
|
|
123
|
+
const state = this.states.get(externalTokenStore) ?? throwErr("External token store state was not initialized");
|
|
124
|
+
const expectedGeneration = state.generation;
|
|
125
|
+
const assertSessionIdentityUnchanged = () => {
|
|
126
|
+
const liveSessionKey = this.buildSessionKey(externalTokenStore, {
|
|
127
|
+
generation: state.generation,
|
|
128
|
+
providerSessionId: externalTokenStore.getSessionId?.(),
|
|
129
|
+
});
|
|
130
|
+
if (state.generation !== expectedGeneration || liveSessionKey !== sessionKey) {
|
|
131
|
+
throw new Error("The external provider session changed while exchanging a token; retrying with the current provider session.");
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
// Returning null from this callback permanently invalidates the cached InternalSession, so
|
|
135
|
+
// we must only do it when the provider session is definitively gone — for transient states
|
|
136
|
+
// we throw instead, which surfaces the failure to the current caller but lets the next
|
|
137
|
+
// request retry the exchange.
|
|
138
|
+
const attemptExchange = async (isRetry: boolean): Promise<AccessToken | null> => {
|
|
139
|
+
assertSessionIdentityUnchanged();
|
|
140
|
+
const externalToken = await externalTokenStore.getToken();
|
|
141
|
+
assertSessionIdentityUnchanged();
|
|
142
|
+
if (externalToken == null) {
|
|
143
|
+
if (externalTokenStore.getSessionId?.() != null) {
|
|
144
|
+
// The provider reports an active session but handed out no token; this is usually a
|
|
145
|
+
// transient state (eg. its SDK is still initializing), so don't treat it as signed out.
|
|
146
|
+
throw new Error("The external token store returned no token even though it reports an active provider session. This is usually transient (eg. the provider SDK is still initializing) and the exchange will be retried on the next request.");
|
|
147
|
+
}
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
try {
|
|
151
|
+
const accessToken = await this.exchangeToken(externalTokenStore.providerId, externalToken);
|
|
152
|
+
const validatedAccessToken = AccessToken.createIfValid(accessToken)
|
|
153
|
+
?? throwErr("External authentication exchange returned an invalid Hexclave access token");
|
|
154
|
+
// An explicit session key bypasses InternalSession's identity check. Refuse to install
|
|
155
|
+
// a token if the provider switched accounts while the exchange was in flight instead
|
|
156
|
+
// of returning null, which would permanently invalidate the reusable session.
|
|
157
|
+
assertSessionIdentityUnchanged();
|
|
158
|
+
return validatedAccessToken;
|
|
159
|
+
} catch (error) {
|
|
160
|
+
if (!KnownErrors.InvalidExternalAuthToken.isInstance(error)) {
|
|
161
|
+
throw error;
|
|
162
|
+
}
|
|
163
|
+
// The server rejects provider tokens that expired in flight with the same error as
|
|
164
|
+
// genuinely bad ones, so retry once with a freshly fetched provider token: the provider
|
|
165
|
+
// SDK replaces an expired token. If the fresh token is rejected too, the cause is not
|
|
166
|
+
// transient (eg. an issuer or client-ID misconfiguration), and it does not mean the
|
|
167
|
+
// provider session ended either: the backend re-establishes a Hexclave session for any
|
|
168
|
+
// valid provider token, so a rejection never signals revocation. Propagate the error
|
|
169
|
+
// instead of returning null, which would permanently invalidate this session and make
|
|
170
|
+
// a misconfiguration look like a silent sign-out.
|
|
171
|
+
if (isRetry) {
|
|
172
|
+
throw error;
|
|
173
|
+
}
|
|
174
|
+
return await attemptExchange(true);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
return await attemptExchange(false);
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
if (externalTokenStore != null) {
|
|
182
|
+
this.externalTokenStoresBySession.set(session, externalTokenStore);
|
|
183
|
+
}
|
|
184
|
+
return session;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
getExternalTokenStoreForSession(session: InternalSession): ExternalTokenStore | undefined {
|
|
188
|
+
return this.externalTokenStoresBySession.get(session);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -83,6 +83,23 @@ export type StackClientApp<HasTokenStore extends boolean = boolean, ProjectId ex
|
|
|
83
83
|
* `redirectToSignIn()`, `redirectToSignUp()`, `redirectToSignOut()`, or `redirectToAccountSettings()`.
|
|
84
84
|
*/
|
|
85
85
|
readonly urls: Readonly<ResolvedHandlerUrls>,
|
|
86
|
+
/** Whether this app delegates authentication to an external provider token store. */
|
|
87
|
+
isExternalAuthApp(): boolean,
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Marks the current page as one that should record analytics (page views, clicks, session replays, and clickmaps).
|
|
91
|
+
*
|
|
92
|
+
* Analytics capture starts automatically when the client app is constructed in the browser, so this function doesn't
|
|
93
|
+
* start anything itself. Call it at the top level of a client-side module that is loaded on every page you want to
|
|
94
|
+
* track (for example, your app's root layout or entry file); the call guarantees that the module creating the client
|
|
95
|
+
* app is actually imported, and therefore constructed, on that page.
|
|
96
|
+
*
|
|
97
|
+
* Throws if this app will never record analytics because of its constructor options (`analytics.enabled: false`,
|
|
98
|
+
* `automaticSideEffects: false`, or a `null` token store). If the Analytics app turns out to be disabled on the
|
|
99
|
+
* project, an error is reported as soon as the backend rejects the first upload. Outside the browser (eg. during
|
|
100
|
+
* server-side rendering), it doesn't throw for that reason alone.
|
|
101
|
+
*/
|
|
102
|
+
initAnalytics(): void,
|
|
86
103
|
|
|
87
104
|
signInWithOAuth(provider: string, options?: { returnTo?: string }): Promise<void>,
|
|
88
105
|
signInWithCredential(options: { email: string, password: string, noRedirect?: boolean }): Promise<Result<undefined, KnownErrors["EmailPasswordMismatch"] | KnownErrors["InvalidTotpCode"]>>,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template
|
|
4
4
|
//===========================================
|
|
5
5
|
import { ProviderType } from "@hexclave/shared/dist/utils/oauth";
|
|
6
|
+
import type { ExternalAuthProviderId } from "@hexclave/shared/dist/interface/external-auth";
|
|
6
7
|
import type { GenericQueryCtx, UserIdentity } from "convex/server";
|
|
7
8
|
export type {
|
|
8
9
|
DefaultHandlerUrlTarget,
|
|
@@ -89,6 +90,37 @@ export type RequestLike = {
|
|
|
89
90
|
| Record<string, string | null>,
|
|
90
91
|
};
|
|
91
92
|
|
|
93
|
+
export type ExternalTokenStore = {
|
|
94
|
+
readonly type: "external",
|
|
95
|
+
readonly providerId: ExternalAuthProviderId,
|
|
96
|
+
getSessionId?(): string | null,
|
|
97
|
+
getToken(): Promise<string | null>,
|
|
98
|
+
/** The adapter retains this subscription for its own lifetime and does not unsubscribe it. */
|
|
99
|
+
subscribe?(callback: () => void): () => void,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
type ExternalTokenStoreOptions = Omit<ExternalTokenStore, "type" | "providerId">;
|
|
103
|
+
|
|
104
|
+
function createExternalTokenStore(providerId: ExternalAuthProviderId, options: ExternalTokenStoreOptions): ExternalTokenStore {
|
|
105
|
+
return {
|
|
106
|
+
...options,
|
|
107
|
+
type: "external",
|
|
108
|
+
providerId,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function clerkTokenStore(options: ExternalTokenStoreOptions): ExternalTokenStore {
|
|
113
|
+
return createExternalTokenStore("clerk-integration", options);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function betterAuthTokenStore(options: ExternalTokenStoreOptions): ExternalTokenStore {
|
|
117
|
+
return createExternalTokenStore("better-auth-integration", options);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function workosTokenStore(options: ExternalTokenStoreOptions): ExternalTokenStore {
|
|
121
|
+
return createExternalTokenStore("workos-integration", options);
|
|
122
|
+
}
|
|
123
|
+
|
|
92
124
|
export type TokenStoreInit<HasTokenStore extends boolean = boolean> =
|
|
93
125
|
HasTokenStore extends true ? (
|
|
94
126
|
| "cookie"
|
|
@@ -96,6 +128,7 @@ export type TokenStoreInit<HasTokenStore extends boolean = boolean> =
|
|
|
96
128
|
| "memory"
|
|
97
129
|
| RequestLike
|
|
98
130
|
| { accessToken: string, refreshToken: string }
|
|
131
|
+
| ExternalTokenStore
|
|
99
132
|
)
|
|
100
133
|
: HasTokenStore extends false ? null
|
|
101
134
|
: TokenStoreInit<true> | TokenStoreInit<false>;
|
|
@@ -83,13 +83,17 @@ export type {
|
|
|
83
83
|
} from "./internal-api-keys";
|
|
84
84
|
|
|
85
85
|
export {
|
|
86
|
+
betterAuthTokenStore,
|
|
87
|
+
clerkTokenStore,
|
|
86
88
|
hexclaveAppInternalsSymbol,
|
|
89
|
+
workosTokenStore,
|
|
87
90
|
} from "./common";
|
|
88
91
|
export {
|
|
89
92
|
getPagePrompt,
|
|
90
93
|
} from "./url-targets";
|
|
91
94
|
export type {
|
|
92
95
|
GetCurrentUserOptions,
|
|
96
|
+
ExternalTokenStore,
|
|
93
97
|
/** @deprecated Use GetCurrentUserOptions instead */
|
|
94
98
|
GetCurrentUserOptions as GetUserOptions,
|
|
95
99
|
HandlerUrlOptions,
|
|
@@ -160,6 +160,7 @@ export type BaseUser = {
|
|
|
160
160
|
* @deprecated
|
|
161
161
|
*/
|
|
162
162
|
readonly oauthProviders: readonly { id: string }[],
|
|
163
|
+
readonly externalAuthProviders: readonly { id: string }[],
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
export type UserExtra = {
|
|
@@ -301,7 +302,12 @@ export type TokenPartialUser = Pick<
|
|
|
301
302
|
| "isMultiFactorRequired"
|
|
302
303
|
| "isRestricted"
|
|
303
304
|
| "restrictedReason"
|
|
304
|
-
>
|
|
305
|
+
> & {
|
|
306
|
+
/**
|
|
307
|
+
* The ID of the user's selected team, read from the `selected_team_id` claim of the access token or Convex identity.
|
|
308
|
+
*/
|
|
309
|
+
readonly selectedTeamId: string | null,
|
|
310
|
+
}
|
|
305
311
|
|
|
306
312
|
export type SyncedPartialUser = TokenPartialUser & Pick<
|
|
307
313
|
User,
|
|
@@ -355,6 +361,12 @@ export function userUpdateOptionsToCrud(options: UserUpdateOptions): CurrentUser
|
|
|
355
361
|
|
|
356
362
|
|
|
357
363
|
export type ServerBaseUser = {
|
|
364
|
+
/**
|
|
365
|
+
* The selected team is a `ServerTeam` when non-null, so `listUsers()` returns full member details
|
|
366
|
+
* without fetching the team again.
|
|
367
|
+
*/
|
|
368
|
+
readonly selectedTeam: ServerTeam | null,
|
|
369
|
+
|
|
358
370
|
setPrimaryEmail(email: string | null, options?: { verified?: boolean | undefined }): Promise<void>,
|
|
359
371
|
|
|
360
372
|
readonly lastActiveAt: Date,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-app-impl-Bxad6t8m.d.ts","names":[],"sources":["../src/lib/hexclave-app/apps/implementations/client-app-impl.ts","../src/lib/hexclave-app/apps/implementations/server-app-impl.ts","../src/lib/hexclave-app/apps/implementations/admin-app-impl.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4EgB,4BAAA;AAAA,KAgRX,+CAAA,4DAA2G,gCAAA,C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