@dereekb/dbx-firebase 14.0.1 → 14.2.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.
|
@@ -5,8 +5,8 @@ import { asObservable, timeoutStartWith, filterMaybe, isNot, SubscriptionObject,
|
|
|
5
5
|
import { Observable, switchMap, of, shareReplay, map, Subject, merge, distinctUntilChanged, EMPTY, catchError, firstValueFrom, tap, BehaviorSubject, combineLatest, first, from, interval, exhaustMap, filter, take, startWith, throttleTime, NEVER, defaultIfEmpty, combineLatestWith, mergeMap, timer, takeWhile, withLatestFrom } from 'rxjs';
|
|
6
6
|
import * as i1$1 from '@dereekb/dbx-core';
|
|
7
7
|
import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, DBX_INJECTION_COMPONENT_DATA, DbxInjectionComponent, AbstractForwardDbxInjectionContextDirective, DbxInjectionContextDirective, DbxAuthImpersonationDelegate, DbxAuthService, provideDbxAuthImpersonation, DbxActionButtonDirective, completeOnDestroy, cleanSubscription, DbxActionDirective, DbxActionEnforceModifiedDirective, DbxActionHandlerDirective, DbxActionAutoTriggerDirective, clean, cleanLoadingContext, provideDbxRouteModelIdDirectiveDelegate, provideDbxRouteModelKeyDirectiveDelegate, AbstractIfDirective, LockSetComponentStore, newWithInjector, DbxActionValueDirective, DbxActionDisabledDirective, TimeDistanceCountdownPipe, TimeDistancePipe, DbxActionContextStoreSourceInstance, DbxActionHandlerInstance, cleanSubscriptionWithLockSet, DbxButton, CutTextPipe, SimpleStorageAccessorFactory, dbxRouteParamReaderInstance, DbxRouteParamDefaultRedirectInstance } from '@dereekb/dbx-core';
|
|
8
|
-
import { onAuthStateChanged, onIdTokenChanged, confirmPasswordReset, sendPasswordResetEmail, signInWithPopup, signInWithRedirect, linkWithPopup, linkWithRedirect, linkWithCredential, unlink, createUserWithEmailAndPassword, signInWithEmailAndPassword, signInAnonymously, reauthenticateWithPopup, reauthenticateWithRedirect, getRedirectResult, OAuthProvider, FacebookAuthProvider, GithubAuthProvider, GoogleAuthProvider, TwitterAuthProvider, getAuth, connectAuthEmulator } from 'firebase/auth';
|
|
9
|
-
import { AUTH_ADMIN_ROLE, cachedGetter, urlWithoutParameters, addToSet, removeFromSet, filterMaybeArrayValues, mapIterable, asArray, excludeValuesFromArray, containsStringAnyCase, addToSetCopy, iterableToArray, runAsyncTasksForValues, forEachKeyValue, countAllInNestedArray, invertDecision, useIterableOrValue, filterUniqueValues, reverseCompareFn, sortByNumberFunction, separateValues, readableError, isMaybeSo, firstValue, fixExtraQueryParameters, splitJoinRemainder, MS_IN_HOUR, SECONDS_IN_MINUTE, MS_IN_DAY, unixDateTimeSecondsNumberForNow, MS_IN_MINUTE, addMilliseconds, unixDateTimeSecondsNumberFromDate, dateFromDateOrTimeSecondsNumber, MS_IN_SECOND, isPast, takeFront, areEqualPOJOValues } from '@dereekb/util';
|
|
8
|
+
import { onAuthStateChanged, onIdTokenChanged, confirmPasswordReset, sendPasswordResetEmail, signInWithPopup, signInWithRedirect, linkWithPopup, linkWithRedirect, linkWithCredential, unlink, createUserWithEmailAndPassword, signInWithEmailAndPassword, signInAnonymously, signInWithCustomToken, reauthenticateWithPopup, reauthenticateWithRedirect, getRedirectResult, OAuthProvider, FacebookAuthProvider, GithubAuthProvider, GoogleAuthProvider, TwitterAuthProvider, getAuth, connectAuthEmulator } from 'firebase/auth';
|
|
9
|
+
import { AUTH_ADMIN_ROLE, cachedGetter, urlWithoutParameters, addToSet, removeFromSet, filterMaybeArrayValues, mapIterable, asArray, excludeValuesFromArray, containsStringAnyCase, addToSetCopy, iterableToArray, runAsyncTasksForValues, forEachKeyValue, countAllInNestedArray, invertDecision, useIterableOrValue, filterUniqueValues, reverseCompareFn, sortByNumberFunction, separateValues, readableError, isMaybeSo, firstValue, fixExtraQueryParameters, generatePkceMaterial, splitJoinRemainder, MS_IN_HOUR, SECONDS_IN_MINUTE, MS_IN_DAY, unixDateTimeSecondsNumberForNow, MS_IN_MINUTE, addMilliseconds, unixDateTimeSecondsNumberFromDate, dateFromDateOrTimeSecondsNumber, MS_IN_SECOND, isPast, takeFront, areEqualPOJOValues } from '@dereekb/util';
|
|
10
10
|
import { safeFormatToISO8601DateString, msToSeconds, isSameDate } from '@dereekb/date';
|
|
11
11
|
import { getToken, initializeAppCheck, ReCaptchaV3Provider } from 'firebase/app-check';
|
|
12
12
|
import * as i1$2 from '@dereekb/dbx-web';
|
|
@@ -636,6 +636,25 @@ class DbxFirebaseAuthService {
|
|
|
636
636
|
logInAsAnonymous() {
|
|
637
637
|
return signInAnonymously(this.firebaseAuth);
|
|
638
638
|
}
|
|
639
|
+
/**
|
|
640
|
+
* Signs in with a Firebase custom token minted by this app's server.
|
|
641
|
+
*
|
|
642
|
+
* The bridge for a third-party provider Firebase Auth has no native provider for: the server
|
|
643
|
+
* authenticates the user against that provider, resolves them to a uid, and mints a token for it.
|
|
644
|
+
*
|
|
645
|
+
* The resulting user has NO `providerData` entry — there is no Firebase provider behind them — so
|
|
646
|
+
* the link/unlink surface does not apply. Managing that third-party identity is the external
|
|
647
|
+
* connection flow's job. The server's stored custom claims are spread to the top level of the
|
|
648
|
+
* exchanged ID token as usual, so security rules behave exactly as for any other sign-in.
|
|
649
|
+
*
|
|
650
|
+
* No `_authUpdate$` nudge is needed: this fires `onAuthStateChanged` like any other sign-in.
|
|
651
|
+
*
|
|
652
|
+
* @param token - The custom token from the server.
|
|
653
|
+
* @returns The credential for the signed-in user.
|
|
654
|
+
*/
|
|
655
|
+
logInWithCustomToken(token) {
|
|
656
|
+
return signInWithCustomToken(this.firebaseAuth, token);
|
|
657
|
+
}
|
|
639
658
|
logOut() {
|
|
640
659
|
return this.firebaseAuth.signOut();
|
|
641
660
|
}
|
|
@@ -1327,6 +1346,14 @@ class AbstractConfiguredDbxFirebaseLoginButtonDirective {
|
|
|
1327
1346
|
get effectiveLoginMode() {
|
|
1328
1347
|
return this._injectionData?.loginMode ?? 'login';
|
|
1329
1348
|
}
|
|
1349
|
+
/**
|
|
1350
|
+
* The registered provider's `componentData`, when the list passed any.
|
|
1351
|
+
*
|
|
1352
|
+
* @returns The component data, or null when the provider declared none.
|
|
1353
|
+
*/
|
|
1354
|
+
get injectedComponentData() {
|
|
1355
|
+
return this._injectionData?.componentData;
|
|
1356
|
+
}
|
|
1330
1357
|
ngOnInit() {
|
|
1331
1358
|
const assets = this.assetConfig;
|
|
1332
1359
|
const text = this._textForMode(assets);
|
|
@@ -1858,12 +1885,15 @@ function defaultFirebaseAuthLoginProvidersFactory() {
|
|
|
1858
1885
|
* @returns EnvironmentProviders.
|
|
1859
1886
|
*/
|
|
1860
1887
|
function provideDbxFirebaseLogin(config) {
|
|
1861
|
-
const { termsOfServiceUrls: loginTerms, enabledLoginMethods, loginTermsComponentClass, passwordConfig } = config;
|
|
1888
|
+
const { termsOfServiceUrls: loginTerms, enabledLoginMethods, loginTermsComponentClass, passwordConfig, additionalProviders } = config;
|
|
1862
1889
|
const providers = [
|
|
1863
1890
|
// Default login providers
|
|
1864
1891
|
{
|
|
1865
1892
|
provide: DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN,
|
|
1866
|
-
|
|
1893
|
+
// the app's own providers go LAST: the service registers this array with `override: false`, so
|
|
1894
|
+
// an app entry for a type the defaults also carry would be dropped rather than winning — which
|
|
1895
|
+
// is the existing contract, and additional providers are additions, not replacements
|
|
1896
|
+
useFactory: () => [...defaultFirebaseAuthLoginProvidersFactory(), ...(additionalProviders ?? [])]
|
|
1867
1897
|
},
|
|
1868
1898
|
// Config for terms
|
|
1869
1899
|
{
|
|
@@ -1899,6 +1929,75 @@ function provideDbxFirebaseLogin(config) {
|
|
|
1899
1929
|
return makeEnvironmentProviders(providers);
|
|
1900
1930
|
}
|
|
1901
1931
|
|
|
1932
|
+
/**
|
|
1933
|
+
* A source of login method types that are linked to the signed-in user but are NOT Firebase-native
|
|
1934
|
+
* providers.
|
|
1935
|
+
*
|
|
1936
|
+
* The seam exists because `currentLinkedProviderIds$` reads `user.providerData`, which can only ever
|
|
1937
|
+
* describe providers Firebase Auth itself issued. A user signed in with a custom token — the whole
|
|
1938
|
+
* point of the external-connection sign-in direction — has an EMPTY `providerData`, so a link/unlink
|
|
1939
|
+
* list built from it alone can never show the provider they actually signed in with.
|
|
1940
|
+
*
|
|
1941
|
+
* Declared here, in `auth/login`, and contributed to from elsewhere: the externalconnection module
|
|
1942
|
+
* already depends on this one, and a dependency the other way would be a cycle.
|
|
1943
|
+
*/
|
|
1944
|
+
class DbxFirebaseLinkedLoginMethodsSource {
|
|
1945
|
+
}
|
|
1946
|
+
/**
|
|
1947
|
+
* Multi-provider token every {@link DbxFirebaseLinkedLoginMethodsSource} registers under.
|
|
1948
|
+
*/
|
|
1949
|
+
const DBX_FIREBASE_LINKED_LOGIN_METHODS_SOURCES_TOKEN = new InjectionToken('DbxFirebaseLinkedLoginMethodsSources');
|
|
1950
|
+
/**
|
|
1951
|
+
* Merges the union of every login method type currently linked to the signed-in user.
|
|
1952
|
+
*
|
|
1953
|
+
* Pure and exported so it is unit-testable without a TestBed.
|
|
1954
|
+
*
|
|
1955
|
+
* @param lists - The per-source lists to merge, most-authoritative first.
|
|
1956
|
+
* @returns The deduped union, in the order the sources reported them.
|
|
1957
|
+
*
|
|
1958
|
+
* @__NO_SIDE_EFFECTS__
|
|
1959
|
+
*/
|
|
1960
|
+
function mergeDbxFirebaseLinkedLoginMethodTypes(lists) {
|
|
1961
|
+
const seen = new Set();
|
|
1962
|
+
const result = [];
|
|
1963
|
+
lists.forEach((list) => {
|
|
1964
|
+
(list ?? []).forEach((type) => {
|
|
1965
|
+
if (!seen.has(type)) {
|
|
1966
|
+
seen.add(type);
|
|
1967
|
+
result.push(type);
|
|
1968
|
+
}
|
|
1969
|
+
});
|
|
1970
|
+
});
|
|
1971
|
+
return result;
|
|
1972
|
+
}
|
|
1973
|
+
/**
|
|
1974
|
+
* The login method types linked to the signed-in user: the Firebase-native ones, plus every
|
|
1975
|
+
* registered {@link DbxFirebaseLinkedLoginMethodsSource}.
|
|
1976
|
+
*
|
|
1977
|
+
* Both the login list and the manage-providers component read from here rather than from
|
|
1978
|
+
* `currentLinkedProviderIds$` directly, so a provider that is a login method without being a Firebase
|
|
1979
|
+
* provider appears in the unlink list and is excluded from the link list — which is what makes the two
|
|
1980
|
+
* lists describe the same set of facts.
|
|
1981
|
+
*/
|
|
1982
|
+
class DbxFirebaseLinkedLoginMethodsService {
|
|
1983
|
+
_dbxFirebaseAuthService = inject(DbxFirebaseAuthService);
|
|
1984
|
+
_sources = inject(DBX_FIREBASE_LINKED_LOGIN_METHODS_SOURCES_TOKEN, { optional: true });
|
|
1985
|
+
/**
|
|
1986
|
+
* The Firebase-native half: the provider ids on the current user's `providerData`.
|
|
1987
|
+
*/
|
|
1988
|
+
nativeLoginMethodTypes$ = this._dbxFirebaseAuthService.currentLinkedProviderIds$.pipe(map((ids) => filterMaybeArrayValues(ids.map(firebaseProviderIdToLoginMethodType))), shareReplay({ bufferSize: 1, refCount: true }));
|
|
1989
|
+
linkedLoginMethodTypes$ = combineLatest([this.nativeLoginMethodTypes$, ...(this._sources ?? []).map((x) => x.linkedLoginMethodTypes$)]).pipe(map(mergeDbxFirebaseLinkedLoginMethodTypes),
|
|
1990
|
+
// refCount so a source backed by a Firestore listener holds no subscription while nothing is
|
|
1991
|
+
// rendering a link/unlink list
|
|
1992
|
+
shareReplay({ bufferSize: 1, refCount: true }));
|
|
1993
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxFirebaseLinkedLoginMethodsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1994
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxFirebaseLinkedLoginMethodsService, providedIn: 'root' });
|
|
1995
|
+
}
|
|
1996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxFirebaseLinkedLoginMethodsService, decorators: [{
|
|
1997
|
+
type: Injectable,
|
|
1998
|
+
args: [{ providedIn: 'root' }]
|
|
1999
|
+
}] });
|
|
2000
|
+
|
|
1902
2001
|
/**
|
|
1903
2002
|
* Renders a list of login provider buttons, filtered by enabled types and categories.
|
|
1904
2003
|
*
|
|
@@ -1907,14 +2006,13 @@ function provideDbxFirebaseLogin(config) {
|
|
|
1907
2006
|
class DbxFirebaseLoginListComponent {
|
|
1908
2007
|
dbxFirebaseAuthLoginService = inject(DbxFirebaseAuthLoginService);
|
|
1909
2008
|
dbxFirebaseAuthService = inject(DbxFirebaseAuthService);
|
|
1910
|
-
|
|
2009
|
+
dbxFirebaseLinkedLoginMethodsService = inject(DbxFirebaseLinkedLoginMethodsService);
|
|
1911
2010
|
/**
|
|
1912
|
-
* The login method types currently linked to the authenticated user
|
|
2011
|
+
* The login method types currently linked to the authenticated user — the Firebase-native ones and
|
|
2012
|
+
* every registered non-native source, since a custom-token provider has no `providerData` entry to
|
|
2013
|
+
* be read from.
|
|
1913
2014
|
*/
|
|
1914
|
-
linkedMethodTypesSignal =
|
|
1915
|
-
return filterMaybeArrayValues(this._linkedProviderIds().map(firebaseProviderIdToLoginMethodType));
|
|
1916
|
-
}, /* @ts-ignore */
|
|
1917
|
-
...(ngDevMode ? [{ debugName: "linkedMethodTypesSignal" }] : /* istanbul ignore next */ []));
|
|
2015
|
+
linkedMethodTypesSignal = toSignal(this.dbxFirebaseLinkedLoginMethodsService.linkedLoginMethodTypes$, { initialValue: [] });
|
|
1918
2016
|
loginMode = input('login', /* @ts-ignore */
|
|
1919
2017
|
...(ngDevMode ? [{ debugName: "loginMode" }] : /* istanbul ignore next */ []));
|
|
1920
2018
|
providerTypes = input(/* @ts-ignore */
|
|
@@ -1978,15 +2076,18 @@ class DbxFirebaseLoginListComponent {
|
|
|
1978
2076
|
switch (loginMode) {
|
|
1979
2077
|
case 'register':
|
|
1980
2078
|
providers = providers.filter((x) => x.registrationComponentClass !== false);
|
|
1981
|
-
mapFn = (x) => ({ componentClass: (x.registrationComponentClass ?? x.componentClass), loginMethodType: x.loginMethodType, data: { loginMode } });
|
|
2079
|
+
mapFn = (x) => ({ componentClass: (x.registrationComponentClass ?? x.componentClass), loginMethodType: x.loginMethodType, data: { loginMode, componentData: x.componentData } });
|
|
1982
2080
|
break;
|
|
1983
2081
|
case 'link':
|
|
1984
2082
|
case 'unlink':
|
|
1985
2083
|
providers = providers.filter((x) => x.allowLinking !== false);
|
|
1986
|
-
mapFn = (x) => ({ componentClass: x.componentClass, loginMethodType: x.loginMethodType, data: { loginMode } });
|
|
2084
|
+
mapFn = (x) => ({ componentClass: x.componentClass, loginMethodType: x.loginMethodType, data: { loginMode, componentData: x.componentData } });
|
|
1987
2085
|
break;
|
|
1988
2086
|
default:
|
|
1989
|
-
|
|
2087
|
+
// `componentData` is carried through so a SHARED button component (one class serving several
|
|
2088
|
+
// providers) can learn which provider it is rendering. Without it the field was declared and
|
|
2089
|
+
// never read, and every provider needed a component class of its own.
|
|
2090
|
+
mapFn = (x) => ({ componentClass: x.componentClass, loginMethodType: x.loginMethodType, data: { loginMode, componentData: x.componentData } });
|
|
1990
2091
|
break;
|
|
1991
2092
|
}
|
|
1992
2093
|
return providers.map(mapFn);
|
|
@@ -2257,11 +2358,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
2257
2358
|
class DbxFirebaseManageAuthProvidersComponent {
|
|
2258
2359
|
dbxFirebaseAuthService = inject(DbxFirebaseAuthService);
|
|
2259
2360
|
dbxFirebaseAuthLoginService = inject(DbxFirebaseAuthLoginService);
|
|
2260
|
-
|
|
2261
|
-
linkedMethodTypesSignal =
|
|
2262
|
-
return filterMaybeArrayValues(this._linkedProviderIds().map(firebaseProviderIdToLoginMethodType));
|
|
2263
|
-
}, /* @ts-ignore */
|
|
2264
|
-
...(ngDevMode ? [{ debugName: "linkedMethodTypesSignal" }] : /* istanbul ignore next */ []));
|
|
2361
|
+
dbxFirebaseLinkedLoginMethodsService = inject(DbxFirebaseLinkedLoginMethodsService);
|
|
2362
|
+
linkedMethodTypesSignal = toSignal(this.dbxFirebaseLinkedLoginMethodsService.linkedLoginMethodTypes$, { initialValue: [] });
|
|
2265
2363
|
showLinkSectionSignal = computed(() => {
|
|
2266
2364
|
const linkedTypes = new Set(this.linkedMethodTypesSignal());
|
|
2267
2365
|
const oauthProviders = this.dbxFirebaseAuthLoginService.getLinkProviders(this.dbxFirebaseAuthLoginService.getEnabledTypes());
|
|
@@ -6704,6 +6802,40 @@ class DbxFirebaseExternalConnectionsConfig {
|
|
|
6704
6802
|
* @returns The authorize path.
|
|
6705
6803
|
*/
|
|
6706
6804
|
const DEFAULT_EXTERNAL_CONNECTION_AUTHORIZE_PATH_FACTORY = (providerType) => `/oauth/${providerType}/authorize`;
|
|
6805
|
+
/**
|
|
6806
|
+
* Default sign-in path for a provider: `/oauth/<providerType>/signin`.
|
|
6807
|
+
*
|
|
6808
|
+
* @param providerType - The provider to build a path for.
|
|
6809
|
+
* @returns The sign-in path.
|
|
6810
|
+
*/
|
|
6811
|
+
const DEFAULT_EXTERNAL_CONNECTION_SIGN_IN_PATH_FACTORY = (providerType) => `/oauth/${providerType}/signin`;
|
|
6812
|
+
/**
|
|
6813
|
+
* Default ticket-exchange path for a provider: `/oauth/<providerType>/token`.
|
|
6814
|
+
*
|
|
6815
|
+
* @param providerType - The provider to build a path for.
|
|
6816
|
+
* @returns The token path.
|
|
6817
|
+
*/
|
|
6818
|
+
const DEFAULT_EXTERNAL_CONNECTION_TOKEN_PATH_FACTORY = (providerType) => `/oauth/${providerType}/token`;
|
|
6819
|
+
/**
|
|
6820
|
+
* Query parameter the completed sign-in returns its ticket on. Must match the server's.
|
|
6821
|
+
*/
|
|
6822
|
+
const EXTERNAL_CONNECTION_SIGN_IN_TICKET_PARAM = 'ticket';
|
|
6823
|
+
/**
|
|
6824
|
+
* Query parameter a FAILED sign-in returns its reason code on. Must match the server's
|
|
6825
|
+
* `USER_EXTERNAL_CONNECTION_SIGN_IN_ERROR_PARAM`.
|
|
6826
|
+
*
|
|
6827
|
+
* The value is one of the server's allowlisted `USER_EXTERNAL_CONNECTION_SIGN_IN_*` codes — an app
|
|
6828
|
+
* maps it to its own copy rather than rendering anything the server said.
|
|
6829
|
+
*/
|
|
6830
|
+
const EXTERNAL_CONNECTION_SIGN_IN_ERROR_PARAM = 'signInError';
|
|
6831
|
+
/**
|
|
6832
|
+
* `sessionStorage` key the in-flight sign-in's PKCE verifier is held under.
|
|
6833
|
+
*
|
|
6834
|
+
* `sessionStorage`, not `localStorage`: the verifier is scoped to the tab that started the flow and
|
|
6835
|
+
* must not outlive it. It is the single secret proving the returning page is the one that began the
|
|
6836
|
+
* sign-in, so a verifier shared across tabs would weaken exactly what it exists to establish.
|
|
6837
|
+
*/
|
|
6838
|
+
const EXTERNAL_CONNECTION_SIGN_IN_VERIFIER_STORAGE_KEY = 'dbx.externalconnection.signin.verifier';
|
|
6707
6839
|
/**
|
|
6708
6840
|
* Derives a row's presentation status from its entry.
|
|
6709
6841
|
*
|
|
@@ -6817,7 +6949,7 @@ const DBX_FIREBASE_KNOWN_EXTERNAL_CONNECTION_PROVIDERS = {
|
|
|
6817
6949
|
* @throws {Error} When there is no known provider for the given type.
|
|
6818
6950
|
*/
|
|
6819
6951
|
function dbxFirebaseKnownExternalConnectionProvider(config) {
|
|
6820
|
-
const { providerType, assets, authorizePath, connect, disconnectConfirm } = config;
|
|
6952
|
+
const { providerType, assets, authorizePath, connect, disconnectConfirm, signIn } = config;
|
|
6821
6953
|
const known = DBX_FIREBASE_KNOWN_EXTERNAL_CONNECTION_PROVIDERS[providerType];
|
|
6822
6954
|
if (known == null) {
|
|
6823
6955
|
throw new Error(`dbxFirebaseKnownExternalConnectionProvider(): there is no known provider for "${providerType}".`);
|
|
@@ -6827,7 +6959,8 @@ function dbxFirebaseKnownExternalConnectionProvider(config) {
|
|
|
6827
6959
|
assets: { ...known.assets, ...assets },
|
|
6828
6960
|
authorizePath: authorizePath ?? known.authorizePath,
|
|
6829
6961
|
connect: connect ?? known.connect,
|
|
6830
|
-
disconnectConfirm: disconnectConfirm ?? known.disconnectConfirm
|
|
6962
|
+
disconnectConfirm: disconnectConfirm ?? known.disconnectConfirm,
|
|
6963
|
+
signIn: signIn ?? known.signIn
|
|
6831
6964
|
};
|
|
6832
6965
|
}
|
|
6833
6966
|
/**
|
|
@@ -6933,6 +7066,20 @@ class DbxFirebaseExternalConnectionService {
|
|
|
6933
7066
|
* missing rather than failing every injection of this service.
|
|
6934
7067
|
*/
|
|
6935
7068
|
_userExternalConnectionFunctions = inject(UserExternalConnectionFunctions, { optional: true });
|
|
7069
|
+
/**
|
|
7070
|
+
* Optional for the same reason: the connect half of this registry never signs anyone in, and a
|
|
7071
|
+
* spec exercising it should not have to stand up Firebase Auth.
|
|
7072
|
+
*/
|
|
7073
|
+
_dbxFirebaseAuthService = inject(DbxFirebaseAuthService, { optional: true });
|
|
7074
|
+
_signInErrorCode = signal(undefined, /* @ts-ignore */
|
|
7075
|
+
...(ngDevMode ? [{ debugName: "_signInErrorCode" }] : /* istanbul ignore next */ []));
|
|
7076
|
+
/**
|
|
7077
|
+
* The reason the last sign-in redirect reported a failure, when it reported one.
|
|
7078
|
+
*
|
|
7079
|
+
* A signal as well as a returned value because the redirect is handled in the app initializer,
|
|
7080
|
+
* before any view exists to receive the return — the login page reads it when it renders.
|
|
7081
|
+
*/
|
|
7082
|
+
signInErrorCode = this._signInErrorCode.asReadonly();
|
|
6936
7083
|
_providers = new Map();
|
|
6937
7084
|
_assets = new Map();
|
|
6938
7085
|
_enableAll = false;
|
|
@@ -7030,14 +7177,15 @@ class DbxFirebaseExternalConnectionService {
|
|
|
7030
7177
|
* creates it on load; a custom UI that reaches this call by another route has to create it too.
|
|
7031
7178
|
*
|
|
7032
7179
|
* @param providerType - The provider the state is for.
|
|
7180
|
+
* @param mode - Which handoff the state begins. Defaults to `connect`.
|
|
7033
7181
|
* @returns The state to send on the authorize request.
|
|
7034
7182
|
*/
|
|
7035
|
-
async mintAuthorizeStateForProvider(providerType) {
|
|
7183
|
+
async mintAuthorizeStateForProvider(providerType, mode) {
|
|
7036
7184
|
const userExternalConnectionFunctions = this._userExternalConnectionFunctions;
|
|
7037
7185
|
if (!userExternalConnectionFunctions) {
|
|
7038
7186
|
throw new Error(`DbxFirebaseExternalConnectionService: cannot mint an authorize state for "${providerType}" because UserExternalConnectionFunctions was not provided. Add the userExternalConnection functions to the app's functions config map, or configure mintAuthorizeState: false.`);
|
|
7039
7187
|
}
|
|
7040
|
-
const { state } = await userExternalConnectionFunctions.userExternalConnection.readUserExternalConnection.authorizeState({ providerType });
|
|
7188
|
+
const { state } = await userExternalConnectionFunctions.userExternalConnection.readUserExternalConnection.authorizeState({ providerType, mode: mode ?? undefined });
|
|
7041
7189
|
return state;
|
|
7042
7190
|
}
|
|
7043
7191
|
/**
|
|
@@ -7045,13 +7193,14 @@ class DbxFirebaseExternalConnectionService {
|
|
|
7045
7193
|
* is enabled.
|
|
7046
7194
|
*
|
|
7047
7195
|
* @param providerType - The provider to resolve.
|
|
7196
|
+
* @param mode - Which handoff the state begins. Defaults to `connect`.
|
|
7048
7197
|
* @returns The authorize url, or null when the provider is not registered.
|
|
7049
7198
|
*/
|
|
7050
|
-
async authorizeUrlWithStateForProvider(providerType) {
|
|
7199
|
+
async authorizeUrlWithStateForProvider(providerType, mode) {
|
|
7051
7200
|
const authorizeUrl = this.authorizeUrlForProvider(providerType);
|
|
7052
7201
|
let result = authorizeUrl;
|
|
7053
7202
|
if (authorizeUrl && this.mintsAuthorizeState) {
|
|
7054
|
-
const state = await this.mintAuthorizeStateForProvider(providerType);
|
|
7203
|
+
const state = await this.mintAuthorizeStateForProvider(providerType, mode);
|
|
7055
7204
|
// appended as text rather than through URL, since an app that shares an origin with its API
|
|
7056
7205
|
// configures no authorizeOrigin and the path stays relative
|
|
7057
7206
|
result = fixExtraQueryParameters(`${authorizeUrl}?state=${encodeURIComponent(state)}`);
|
|
@@ -7109,12 +7258,410 @@ class DbxFirebaseExternalConnectionService {
|
|
|
7109
7258
|
await navigate(authorizeUrl);
|
|
7110
7259
|
}
|
|
7111
7260
|
}
|
|
7261
|
+
/**
|
|
7262
|
+
* Makes a provider a LOGIN METHOD for the already-signed-in user.
|
|
7263
|
+
*
|
|
7264
|
+
* The connect flow's twin, and deliberately a separate round trip rather than a flag on it: the
|
|
7265
|
+
* authorize request runs the provider's SIGN-IN scopes, which are not the data scopes, so one grant
|
|
7266
|
+
* cannot stand in for the other. The server writes only the login link and stores no credentials.
|
|
7267
|
+
*
|
|
7268
|
+
* @param providerType - The provider to link.
|
|
7269
|
+
* @returns Resolves once the authorize page is actually opening, and rejects when it never opened.
|
|
7270
|
+
* @throws {Error} When the provider is not registered, or declares no `signIn` config.
|
|
7271
|
+
*/
|
|
7272
|
+
async linkProvider(providerType) {
|
|
7273
|
+
const provider = this.getProvider(providerType);
|
|
7274
|
+
if (!provider) {
|
|
7275
|
+
throw new Error(`DbxFirebaseExternalConnectionService: no provider registered for "${providerType}".`);
|
|
7276
|
+
}
|
|
7277
|
+
if (!provider.signIn) {
|
|
7278
|
+
throw new Error(`DbxFirebaseExternalConnectionService: "${providerType}" is not registered for sign-in, so it cannot be linked as a login method.`);
|
|
7279
|
+
}
|
|
7280
|
+
const authorizeUrl = await this.authorizeUrlWithStateForProvider(providerType, 'link');
|
|
7281
|
+
if (!authorizeUrl) {
|
|
7282
|
+
throw new Error(`DbxFirebaseExternalConnectionService: no authorize url could be resolved for "${providerType}".`);
|
|
7283
|
+
}
|
|
7284
|
+
// awaited exactly as `connectToProvider` awaits it, so the action stays working until the authorize
|
|
7285
|
+
// page is really opening rather than reporting success against a page that has not moved
|
|
7286
|
+
const navigate = this.config.navigate ?? DEFAULT_EXTERNAL_CONNECTION_NAVIGATE_FUNCTION;
|
|
7287
|
+
await navigate(authorizeUrl);
|
|
7288
|
+
}
|
|
7289
|
+
/**
|
|
7290
|
+
* Removes a provider as a login method for the signed-in user.
|
|
7291
|
+
*
|
|
7292
|
+
* Strictly more than a disconnect: the server removes the login link, the data connection, and its
|
|
7293
|
+
* credentials together. Refused server-side when it would leave the account with no way to sign in.
|
|
7294
|
+
*
|
|
7295
|
+
* @param providerType - The provider to remove as a login method.
|
|
7296
|
+
* @returns Resolves once the server has applied the change.
|
|
7297
|
+
*/
|
|
7298
|
+
async unlinkProvider(providerType) {
|
|
7299
|
+
const userExternalConnectionFunctions = this._userExternalConnectionFunctions;
|
|
7300
|
+
if (!userExternalConnectionFunctions) {
|
|
7301
|
+
throw new Error(`DbxFirebaseExternalConnectionService: cannot unlink "${providerType}" because UserExternalConnectionFunctions was not provided. Add the userExternalConnection functions to the app's functions config map.`);
|
|
7302
|
+
}
|
|
7303
|
+
await userExternalConnectionFunctions.userExternalConnection.updateUserExternalConnection.unlink({ providerType });
|
|
7304
|
+
}
|
|
7305
|
+
// MARK: Sign In
|
|
7306
|
+
/**
|
|
7307
|
+
* Resolves the sign-in url for a provider.
|
|
7308
|
+
*
|
|
7309
|
+
* @param providerType - The provider to resolve.
|
|
7310
|
+
* @returns The sign-in url, or null when the provider is not registered for sign-in.
|
|
7311
|
+
*/
|
|
7312
|
+
signInUrlForProvider(providerType) {
|
|
7313
|
+
const provider = this.getProvider(providerType);
|
|
7314
|
+
let result = null;
|
|
7315
|
+
if (provider?.signIn) {
|
|
7316
|
+
const path = provider.signIn.signInPath ?? DEFAULT_EXTERNAL_CONNECTION_SIGN_IN_PATH_FACTORY(providerType);
|
|
7317
|
+
result = this.config.authorizeOrigin ? `${this.config.authorizeOrigin}${path}` : path;
|
|
7318
|
+
}
|
|
7319
|
+
return result;
|
|
7320
|
+
}
|
|
7321
|
+
/**
|
|
7322
|
+
* Resolves the ticket-exchange url for a provider.
|
|
7323
|
+
*
|
|
7324
|
+
* @param providerType - The provider to resolve.
|
|
7325
|
+
* @returns The token url, or null when the provider is not registered for sign-in.
|
|
7326
|
+
*/
|
|
7327
|
+
signInTokenUrlForProvider(providerType) {
|
|
7328
|
+
const provider = this.getProvider(providerType);
|
|
7329
|
+
let result = null;
|
|
7330
|
+
if (provider?.signIn) {
|
|
7331
|
+
const path = DEFAULT_EXTERNAL_CONNECTION_TOKEN_PATH_FACTORY(providerType);
|
|
7332
|
+
result = this.config.authorizeOrigin ? `${this.config.authorizeOrigin}${path}` : path;
|
|
7333
|
+
}
|
|
7334
|
+
return result;
|
|
7335
|
+
}
|
|
7336
|
+
/**
|
|
7337
|
+
* Begins the sign-in flow for a provider.
|
|
7338
|
+
*
|
|
7339
|
+
* Unlike {@link connectToProvider} there is no `state` to mint: the caller is not signed in, so
|
|
7340
|
+
* there is no authenticated call to make. A PKCE verifier is generated instead and kept in
|
|
7341
|
+
* `sessionStorage`; only its challenge travels, and the ticket the server hands back at the end is
|
|
7342
|
+
* redeemable only by whoever still holds the verifier. That is what makes a redirect-borne ticket
|
|
7343
|
+
* safe where a redirect-borne token would not be.
|
|
7344
|
+
*
|
|
7345
|
+
* REQUIRES a secure context: the challenge is derived with `crypto.subtle`, which browsers expose
|
|
7346
|
+
* only over https or on `localhost`. An app served over plain http on a LAN address cannot start a
|
|
7347
|
+
* sign-in — the same constraint every PKCE client in this workspace already carries.
|
|
7348
|
+
*
|
|
7349
|
+
* @param providerType - The provider to sign in with.
|
|
7350
|
+
* @returns Resolves once the provider's consent page is actually opening.
|
|
7351
|
+
*/
|
|
7352
|
+
async signInWithProvider(providerType) {
|
|
7353
|
+
const provider = this.getProvider(providerType);
|
|
7354
|
+
if (!provider?.signIn) {
|
|
7355
|
+
throw new Error(`DbxFirebaseExternalConnectionService: "${providerType}" is not registered for sign-in.`);
|
|
7356
|
+
}
|
|
7357
|
+
const signInUrl = this.signInUrlForProvider(providerType);
|
|
7358
|
+
if (!signInUrl) {
|
|
7359
|
+
throw new Error(`DbxFirebaseExternalConnectionService: no sign-in url could be resolved for "${providerType}".`);
|
|
7360
|
+
}
|
|
7361
|
+
const { codeVerifier, codeChallenge } = await generatePkceMaterial();
|
|
7362
|
+
// written BEFORE navigating: once the page is unloading there is no chance to store anything, and
|
|
7363
|
+
// a flow whose verifier never landed is unredeemable at the other end
|
|
7364
|
+
this.storeSignInVerifier(providerType, codeVerifier);
|
|
7365
|
+
const returnPath = provider.signIn.returnPath;
|
|
7366
|
+
const returnPathParam = returnPath ? `&returnPath=${encodeURIComponent(returnPath)}` : '';
|
|
7367
|
+
const url = fixExtraQueryParameters(`${signInUrl}?challenge=${encodeURIComponent(codeChallenge)}${returnPathParam}`);
|
|
7368
|
+
const navigate = this.config.navigate ?? DEFAULT_EXTERNAL_CONNECTION_NAVIGATE_FUNCTION;
|
|
7369
|
+
await navigate(url);
|
|
7370
|
+
}
|
|
7371
|
+
/**
|
|
7372
|
+
* Completes a sign-in that has just redirected back, when the current URL carries a ticket — or
|
|
7373
|
+
* records the reason when it carries a failure instead.
|
|
7374
|
+
*
|
|
7375
|
+
* Safe to call unconditionally on app start: a page carrying neither resolves to a not-signed-in
|
|
7376
|
+
* result without touching the network. A reported failure does NOT throw: it is the server
|
|
7377
|
+
* answering a question the user asked, not a fault, and the login page renders it.
|
|
7378
|
+
*
|
|
7379
|
+
* @param url - The url to read from. Defaults to the current location.
|
|
7380
|
+
* @returns Whether a ticket was redeemed, and the reason when the redirect reported a failure.
|
|
7381
|
+
*/
|
|
7382
|
+
async handleSignInRedirectResult(url = window.location.href) {
|
|
7383
|
+
const ticket = readExternalConnectionSignInTicketFromUrl(url);
|
|
7384
|
+
const errorCode = ticket == null ? readExternalConnectionSignInFailureFromUrl(url) : undefined;
|
|
7385
|
+
let result = { signedIn: false };
|
|
7386
|
+
if (ticket != null) {
|
|
7387
|
+
const stored = this.readStoredSignInVerifier();
|
|
7388
|
+
// ALWAYS cleared, success or not: a verifier is single-use, and one left behind would be
|
|
7389
|
+
// offered against whatever ticket arrived next
|
|
7390
|
+
this.clearStoredSignInVerifier();
|
|
7391
|
+
if (stored == null) {
|
|
7392
|
+
throw new Error('DbxFirebaseExternalConnectionService: a sign-in ticket arrived with no stored verifier. The sign-in must be completed in the tab that started it.');
|
|
7393
|
+
}
|
|
7394
|
+
const customToken = await this.exchangeSignInTicket({ providerType: stored.providerType, ticket, verifier: stored.codeVerifier });
|
|
7395
|
+
const dbxFirebaseAuthService = this._dbxFirebaseAuthService;
|
|
7396
|
+
if (!dbxFirebaseAuthService) {
|
|
7397
|
+
throw new Error('DbxFirebaseExternalConnectionService: cannot complete a sign-in because DbxFirebaseAuthService was not provided.');
|
|
7398
|
+
}
|
|
7399
|
+
await dbxFirebaseAuthService.logInWithCustomToken(customToken);
|
|
7400
|
+
result = { signedIn: true };
|
|
7401
|
+
}
|
|
7402
|
+
else if (errorCode != null) {
|
|
7403
|
+
// the flow ended at the provider or the server, so the verifier it was minted for is spent —
|
|
7404
|
+
// leaving it behind would offer a stale one against the NEXT sign-in's ticket
|
|
7405
|
+
this.clearStoredSignInVerifier();
|
|
7406
|
+
this._signInErrorCode.set(errorCode);
|
|
7407
|
+
result = { signedIn: false, errorCode };
|
|
7408
|
+
}
|
|
7409
|
+
return result;
|
|
7410
|
+
}
|
|
7411
|
+
/**
|
|
7412
|
+
* Clears the recorded sign-in failure, e.g. once the login page has shown it.
|
|
7413
|
+
*/
|
|
7414
|
+
clearSignInErrorCode() {
|
|
7415
|
+
this._signInErrorCode.set(undefined);
|
|
7416
|
+
}
|
|
7417
|
+
/**
|
|
7418
|
+
* Posts a ticket and its verifier to the provider's token endpoint.
|
|
7419
|
+
*
|
|
7420
|
+
* @param input - The provider, the ticket from the redirect, and the stored verifier.
|
|
7421
|
+
* @param input.providerType - The provider the ticket belongs to.
|
|
7422
|
+
* @param input.ticket - The ticket the redirect carried.
|
|
7423
|
+
* @param input.verifier - The PKCE verifier the browser retained.
|
|
7424
|
+
* @returns The Firebase custom token.
|
|
7425
|
+
*/
|
|
7426
|
+
async exchangeSignInTicket(input) {
|
|
7427
|
+
const tokenUrl = this.signInTokenUrlForProvider(input.providerType);
|
|
7428
|
+
if (!tokenUrl) {
|
|
7429
|
+
throw new Error(`DbxFirebaseExternalConnectionService: no token url could be resolved for "${input.providerType}".`);
|
|
7430
|
+
}
|
|
7431
|
+
const response = await fetch(tokenUrl, {
|
|
7432
|
+
method: 'POST',
|
|
7433
|
+
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
|
|
7434
|
+
body: JSON.stringify({ ticket: input.ticket, verifier: input.verifier })
|
|
7435
|
+
});
|
|
7436
|
+
if (!response.ok) {
|
|
7437
|
+
throw new Error(`DbxFirebaseExternalConnectionService: the "${input.providerType}" sign-in ticket was rejected (${response.status}).`);
|
|
7438
|
+
}
|
|
7439
|
+
const { customToken } = (await response.json());
|
|
7440
|
+
if (!customToken) {
|
|
7441
|
+
throw new Error(`DbxFirebaseExternalConnectionService: the "${input.providerType}" ticket exchange returned no custom token.`);
|
|
7442
|
+
}
|
|
7443
|
+
return customToken;
|
|
7444
|
+
}
|
|
7445
|
+
/**
|
|
7446
|
+
* Stores the in-flight sign-in's verifier and the provider it belongs to.
|
|
7447
|
+
*
|
|
7448
|
+
* @param providerType - The provider the flow was started for.
|
|
7449
|
+
* @param codeVerifier - The PKCE verifier to retain.
|
|
7450
|
+
*/
|
|
7451
|
+
storeSignInVerifier(providerType, codeVerifier) {
|
|
7452
|
+
sessionStorage.setItem(EXTERNAL_CONNECTION_SIGN_IN_VERIFIER_STORAGE_KEY, JSON.stringify({ providerType, codeVerifier }));
|
|
7453
|
+
}
|
|
7454
|
+
/**
|
|
7455
|
+
* Reads the stored verifier, treating a corrupt entry as absent — the same contract
|
|
7456
|
+
* `webStorageValueCache` keeps, so a malformed entry never wedges the sign-in.
|
|
7457
|
+
*
|
|
7458
|
+
* @returns The stored provider and verifier, or null when there is none.
|
|
7459
|
+
*/
|
|
7460
|
+
readStoredSignInVerifier() {
|
|
7461
|
+
const raw = sessionStorage.getItem(EXTERNAL_CONNECTION_SIGN_IN_VERIFIER_STORAGE_KEY);
|
|
7462
|
+
let result;
|
|
7463
|
+
if (raw != null) {
|
|
7464
|
+
try {
|
|
7465
|
+
const parsed = JSON.parse(raw);
|
|
7466
|
+
result = parsed?.providerType && parsed.codeVerifier ? { providerType: parsed.providerType, codeVerifier: parsed.codeVerifier } : undefined;
|
|
7467
|
+
}
|
|
7468
|
+
catch {
|
|
7469
|
+
result = undefined;
|
|
7470
|
+
}
|
|
7471
|
+
}
|
|
7472
|
+
return result;
|
|
7473
|
+
}
|
|
7474
|
+
clearStoredSignInVerifier() {
|
|
7475
|
+
sessionStorage.removeItem(EXTERNAL_CONNECTION_SIGN_IN_VERIFIER_STORAGE_KEY);
|
|
7476
|
+
}
|
|
7112
7477
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxFirebaseExternalConnectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7113
7478
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxFirebaseExternalConnectionService });
|
|
7114
7479
|
}
|
|
7115
7480
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxFirebaseExternalConnectionService, decorators: [{
|
|
7116
7481
|
type: Injectable
|
|
7117
7482
|
}], ctorParameters: () => [] });
|
|
7483
|
+
/**
|
|
7484
|
+
* Reads the sign-in ticket a completed handoff redirected back with.
|
|
7485
|
+
*
|
|
7486
|
+
* @param url - The url to read.
|
|
7487
|
+
* @returns The ticket, or null when the url carries none.
|
|
7488
|
+
*
|
|
7489
|
+
* @__NO_SIDE_EFFECTS__
|
|
7490
|
+
*/
|
|
7491
|
+
function readExternalConnectionSignInTicketFromUrl(url) {
|
|
7492
|
+
let result;
|
|
7493
|
+
try {
|
|
7494
|
+
result = new URL(url).searchParams.get(EXTERNAL_CONNECTION_SIGN_IN_TICKET_PARAM) ?? undefined;
|
|
7495
|
+
}
|
|
7496
|
+
catch {
|
|
7497
|
+
// a url that does not parse carries no ticket
|
|
7498
|
+
}
|
|
7499
|
+
return result;
|
|
7500
|
+
}
|
|
7501
|
+
/**
|
|
7502
|
+
* Reads the reason code a FAILED sign-in redirected back with.
|
|
7503
|
+
*
|
|
7504
|
+
* @param url - The url to read.
|
|
7505
|
+
* @returns The reason code, or null when the url carries none.
|
|
7506
|
+
*
|
|
7507
|
+
* @__NO_SIDE_EFFECTS__
|
|
7508
|
+
*/
|
|
7509
|
+
function readExternalConnectionSignInFailureFromUrl(url) {
|
|
7510
|
+
let result;
|
|
7511
|
+
try {
|
|
7512
|
+
result = new URL(url).searchParams.get(EXTERNAL_CONNECTION_SIGN_IN_ERROR_PARAM) ?? undefined;
|
|
7513
|
+
}
|
|
7514
|
+
catch {
|
|
7515
|
+
// a url that does not parse carries no reason
|
|
7516
|
+
}
|
|
7517
|
+
return result;
|
|
7518
|
+
}
|
|
7519
|
+
|
|
7520
|
+
/**
|
|
7521
|
+
* The login button for a third-party provider that is NOT a Firebase auth provider.
|
|
7522
|
+
*
|
|
7523
|
+
* ONE component class for every such provider, not one per provider like Google or Apple: those each
|
|
7524
|
+
* construct a different `firebase/auth` provider class, which is code; here the only per-provider
|
|
7525
|
+
* variation is a url and some brand colors, which is data. The provider it is rendering arrives as
|
|
7526
|
+
* `componentData`.
|
|
7527
|
+
*
|
|
7528
|
+
* ## How link/unlink work here
|
|
7529
|
+
*
|
|
7530
|
+
* NOT through the Firebase SDK's own `linkWithPopup` and its inverse. A custom-token sign-in produces
|
|
7531
|
+
* a Firebase user with NO `providerData` entry — there is no Firebase provider behind it — so the base
|
|
7532
|
+
* implementations have nothing to act on and `LOGIN_METHOD_TYPE_TO_FIREBASE_PROVIDER_ID_MAP` has no
|
|
7533
|
+
* entry to resolve.
|
|
7534
|
+
*
|
|
7535
|
+
* Both are overridden onto the external-connection service instead: linking runs a second OAuth round
|
|
7536
|
+
* trip in `link` mode, which writes the account's login link server-side; the inverse calls the server
|
|
7537
|
+
* and removes it. To a user these mean exactly what they mean for Google, which is why these providers
|
|
7538
|
+
* belong in the same list rather than being excluded from it.
|
|
7539
|
+
*
|
|
7540
|
+
* Distinct from the CONNECT row `DbxFirebaseExternalConnectionsComponent` renders for the same
|
|
7541
|
+
* provider: that manages the DATA connection, whose credentials can expire and be revoked
|
|
7542
|
+
* independently of whether the provider is still a way to sign in.
|
|
7543
|
+
*/
|
|
7544
|
+
class DbxFirebaseLoginExternalConnectionComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
|
|
7545
|
+
dbxFirebaseExternalConnectionService = inject(DbxFirebaseExternalConnectionService);
|
|
7546
|
+
/**
|
|
7547
|
+
* The external connection provider this button signs in with.
|
|
7548
|
+
*
|
|
7549
|
+
* @returns The provider type from the registered `componentData`.
|
|
7550
|
+
* @throws {Error} When the component was rendered without it — a registration mistake, and one that
|
|
7551
|
+
* would otherwise surface as a redirect to an unrelated provider.
|
|
7552
|
+
*/
|
|
7553
|
+
get providerType() {
|
|
7554
|
+
const componentData = this.injectedComponentData;
|
|
7555
|
+
if (!componentData?.providerType) {
|
|
7556
|
+
throw new Error('DbxFirebaseLoginExternalConnectionComponent was rendered with no providerType in its componentData.');
|
|
7557
|
+
}
|
|
7558
|
+
return componentData.providerType;
|
|
7559
|
+
}
|
|
7560
|
+
get loginProvider() {
|
|
7561
|
+
return this.providerType;
|
|
7562
|
+
}
|
|
7563
|
+
handleLogin() {
|
|
7564
|
+
return this.dbxFirebaseExternalConnectionService.signInWithProvider(this.providerType);
|
|
7565
|
+
}
|
|
7566
|
+
/**
|
|
7567
|
+
* Links the provider as a login method by starting the `link` OAuth handoff.
|
|
7568
|
+
*
|
|
7569
|
+
* @returns Resolves once the authorize page is opening.
|
|
7570
|
+
*/
|
|
7571
|
+
handleLink() {
|
|
7572
|
+
return this.dbxFirebaseExternalConnectionService.linkProvider(this.providerType);
|
|
7573
|
+
}
|
|
7574
|
+
/**
|
|
7575
|
+
* Removes the provider as a login method.
|
|
7576
|
+
*
|
|
7577
|
+
* @returns Resolves once the server has applied the change.
|
|
7578
|
+
*/
|
|
7579
|
+
handleUnlink() {
|
|
7580
|
+
return this.dbxFirebaseExternalConnectionService.unlinkProvider(this.providerType);
|
|
7581
|
+
}
|
|
7582
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxFirebaseLoginExternalConnectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7583
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: DbxFirebaseLoginExternalConnectionComponent, isStandalone: true, selector: "dbx-firebase-login-external-connection", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"configSignal()\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"], outputs: ["configChange"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] });
|
|
7584
|
+
}
|
|
7585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxFirebaseLoginExternalConnectionComponent, decorators: [{
|
|
7586
|
+
type: Component,
|
|
7587
|
+
args: [{
|
|
7588
|
+
selector: 'dbx-firebase-login-external-connection',
|
|
7589
|
+
imports: DBX_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_COMPONENT_CONFIGURATION.imports,
|
|
7590
|
+
template: DBX_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_COMPONENT_CONFIGURATION.template
|
|
7591
|
+
}]
|
|
7592
|
+
}] });
|
|
7593
|
+
|
|
7594
|
+
/**
|
|
7595
|
+
* The login category external-connection sign-in providers register under.
|
|
7596
|
+
*
|
|
7597
|
+
* `oauth`, the same category the Firebase-native federated providers use: to a user, "Log in with
|
|
7598
|
+
* Discord" and "Log in with Google" are the same affordance, and a login list filtering by category
|
|
7599
|
+
* should show them together.
|
|
7600
|
+
*/
|
|
7601
|
+
const DBX_FIREBASE_EXTERNAL_CONNECTION_LOGIN_CATEGORY = 'oauth';
|
|
7602
|
+
/**
|
|
7603
|
+
* Derives the {@link DbxFirebaseAuthLoginProvider} for an external-connection provider that declares
|
|
7604
|
+
* a `signIn` config.
|
|
7605
|
+
*
|
|
7606
|
+
* DERIVED rather than declared separately so the login button and the settings row can never disagree
|
|
7607
|
+
* about which providers exist — there is one registration, and this projects it onto the login
|
|
7608
|
+
* registry.
|
|
7609
|
+
*
|
|
7610
|
+
* Linking IS allowed. It is not `linkWithPopup` — a custom-token user has no `providerData` entry for
|
|
7611
|
+
* the Firebase SDK to attach to — it is a second OAuth round trip in `link` mode, which writes the
|
|
7612
|
+
* account's login link server-side. The two mean the same thing to a user, so they belong in the same
|
|
7613
|
+
* list; only the mechanism differs, and that lives in
|
|
7614
|
+
* {@link DbxFirebaseLoginExternalConnectionComponent}.
|
|
7615
|
+
*
|
|
7616
|
+
* Distinct from the CONNECT row on the settings page, which manages the DATA connection. "Discord is
|
|
7617
|
+
* how I log in" and "Discord's token still works" are different facts with different lifecycles, so
|
|
7618
|
+
* they get different buttons.
|
|
7619
|
+
*
|
|
7620
|
+
* `registrationComponentClass` is the same component: "Sign up with Discord" and "Log in with
|
|
7621
|
+
* Discord" are one button pressed by users in two situations, and the server resolves which it is.
|
|
7622
|
+
*
|
|
7623
|
+
* @param provider - The external connection provider to derive from.
|
|
7624
|
+
* @returns The login provider, or null when the provider declares no `signIn`.
|
|
7625
|
+
*
|
|
7626
|
+
* @__NO_SIDE_EFFECTS__
|
|
7627
|
+
*/
|
|
7628
|
+
function dbxFirebaseExternalConnectionLoginProvider(provider) {
|
|
7629
|
+
const { providerType, signIn, assets } = provider;
|
|
7630
|
+
let result;
|
|
7631
|
+
if (signIn) {
|
|
7632
|
+
result = {
|
|
7633
|
+
category: DBX_FIREBASE_EXTERNAL_CONNECTION_LOGIN_CATEGORY,
|
|
7634
|
+
loginMethodType: signIn.loginMethodType ?? providerType,
|
|
7635
|
+
componentClass: DbxFirebaseLoginExternalConnectionComponent,
|
|
7636
|
+
registrationComponentClass: DbxFirebaseLoginExternalConnectionComponent,
|
|
7637
|
+
allowLinking: true,
|
|
7638
|
+
componentData: { providerType },
|
|
7639
|
+
assets: {
|
|
7640
|
+
providerName: assets.providerName,
|
|
7641
|
+
loginText: signIn.loginText ?? `Continue with ${assets.providerName}`,
|
|
7642
|
+
linkText: signIn.linkText ?? `Connect ${assets.providerName}`,
|
|
7643
|
+
unlinkText: signIn.unlinkText ?? `Disconnect ${assets.providerName}`,
|
|
7644
|
+
loginIcon: signIn.loginIcon ?? assets.icon ?? undefined,
|
|
7645
|
+
logoUrl: assets.logoUrl ?? undefined,
|
|
7646
|
+
logoFilter: assets.logoFilter ?? undefined,
|
|
7647
|
+
backgroundColor: signIn.backgroundColor ?? undefined,
|
|
7648
|
+
textColor: signIn.textColor ?? undefined
|
|
7649
|
+
}
|
|
7650
|
+
};
|
|
7651
|
+
}
|
|
7652
|
+
return result;
|
|
7653
|
+
}
|
|
7654
|
+
/**
|
|
7655
|
+
* Derives the login providers for every entry that declares a `signIn` config.
|
|
7656
|
+
*
|
|
7657
|
+
* @param entries - The app's external-connection provider entries.
|
|
7658
|
+
* @returns The derived login providers, in the order the entries were declared.
|
|
7659
|
+
*
|
|
7660
|
+
* @__NO_SIDE_EFFECTS__
|
|
7661
|
+
*/
|
|
7662
|
+
function dbxFirebaseExternalConnectionLoginProviders(entries) {
|
|
7663
|
+
return filterMaybeArrayValues(entries.map((x) => dbxFirebaseExternalConnectionLoginProvider(dbxFirebaseExternalConnectionProviderForEntry(x))));
|
|
7664
|
+
}
|
|
7118
7665
|
|
|
7119
7666
|
/**
|
|
7120
7667
|
* Injection token for the app's UserExternalConnection collection.
|
|
@@ -7144,9 +7691,14 @@ class UserExternalConnectionDocumentStore extends AbstractDbxFirebaseDocumentSto
|
|
|
7144
7691
|
*/
|
|
7145
7692
|
createUserExternalConnection = firebaseDocumentStoreCreateFunction(this, this.userExternalConnectionFunctions.userExternalConnection.createUserExternalConnection);
|
|
7146
7693
|
/**
|
|
7147
|
-
* Disconnects the user from a provider. The
|
|
7694
|
+
* Disconnects the user from a provider's DATA connection. The provider's login link is retained.
|
|
7148
7695
|
*/
|
|
7149
7696
|
disconnectUserExternalConnection = firebaseDocumentStoreUpdateFunction(this, this.userExternalConnectionFunctions.userExternalConnection.updateUserExternalConnection.disconnect);
|
|
7697
|
+
/**
|
|
7698
|
+
* Removes a provider as a login method. Strictly more than a disconnect — it takes the data
|
|
7699
|
+
* connection and its credentials with it.
|
|
7700
|
+
*/
|
|
7701
|
+
unlinkUserExternalConnectionLogin = firebaseDocumentStoreUpdateFunction(this, this.userExternalConnectionFunctions.userExternalConnection.updateUserExternalConnection.unlink);
|
|
7150
7702
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UserExternalConnectionDocumentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7151
7703
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UserExternalConnectionDocumentStore });
|
|
7152
7704
|
}
|
|
@@ -7154,6 +7706,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
7154
7706
|
type: Injectable
|
|
7155
7707
|
}], ctorParameters: () => [] });
|
|
7156
7708
|
|
|
7709
|
+
/**
|
|
7710
|
+
* Projects a user's login link map onto the login method types those providers are registered under.
|
|
7711
|
+
*
|
|
7712
|
+
* Only providers that declare a `signIn` config contribute: a link recorded for a provider the app no
|
|
7713
|
+
* longer offers as a login method must not put an unrenderable row in the unlink list. The registered
|
|
7714
|
+
* `signIn.loginMethodType` wins over the provider type, because that is the type the login registry
|
|
7715
|
+
* knows the provider by.
|
|
7716
|
+
*
|
|
7717
|
+
* Pure and exported so it is unit-testable without a TestBed.
|
|
7718
|
+
*
|
|
7719
|
+
* @param logins - The user's login link map.
|
|
7720
|
+
* @param service - The external connection registry, consulted for each provider's registration.
|
|
7721
|
+
* @returns The login method types, in the login map's key order.
|
|
7722
|
+
*
|
|
7723
|
+
* @__NO_SIDE_EFFECTS__
|
|
7724
|
+
*/
|
|
7725
|
+
function dbxFirebaseExternalConnectionLinkedLoginMethodTypes(logins, service) {
|
|
7726
|
+
const result = [];
|
|
7727
|
+
Object.keys(logins ?? {}).forEach((providerType) => {
|
|
7728
|
+
const signIn = service.getProvider(providerType)?.signIn;
|
|
7729
|
+
if (signIn) {
|
|
7730
|
+
result.push(signIn.loginMethodType ?? providerType);
|
|
7731
|
+
}
|
|
7732
|
+
});
|
|
7733
|
+
return result;
|
|
7734
|
+
}
|
|
7735
|
+
/**
|
|
7736
|
+
* Reports the providers the signed-in user has linked as LOGIN METHODS, for the link/unlink lists.
|
|
7737
|
+
*
|
|
7738
|
+
* The `providerData`-backed `currentLinkedProviderIds$` cannot see these: a custom-token user has no
|
|
7739
|
+
* Firebase provider entry at all, so without this source Discord could never appear in "Connected
|
|
7740
|
+
* Providers" and would be offered in "Connect Provider" even after being linked.
|
|
7741
|
+
*
|
|
7742
|
+
* Reads the connection document DIRECTLY off the root-provided collections rather than through
|
|
7743
|
+
* `UserExternalConnectionDocumentStore`, which is component-scoped and only exists while the settings
|
|
7744
|
+
* page is rendered. `refCount` on the shared replay keeps that from becoming an always-open Firestore
|
|
7745
|
+
* listener: nothing subscribes unless a link or unlink list is actually on screen.
|
|
7746
|
+
*/
|
|
7747
|
+
class DbxFirebaseExternalConnectionLinkedLoginMethodsSource {
|
|
7748
|
+
_dbxFirebaseUserExternalConnectionCollections = inject(DbxFirebaseUserExternalConnectionCollections);
|
|
7749
|
+
_dbxFirebaseAuthService = inject(DbxFirebaseAuthService);
|
|
7750
|
+
_dbxFirebaseExternalConnectionService = inject(DbxFirebaseExternalConnectionService);
|
|
7751
|
+
_connection$ = this._dbxFirebaseAuthService.currentUid$.pipe(
|
|
7752
|
+
// currentUid$ rather than userIdentifier$: the latter substitutes NO_AUTH_USER_IDENTIFIER ('0')
|
|
7753
|
+
// when signed out, which would ask Firestore for uec/0
|
|
7754
|
+
switchMap((uid) => uid
|
|
7755
|
+
? this._dbxFirebaseUserExternalConnectionCollections.userExternalConnectionCollection
|
|
7756
|
+
.documentAccessor()
|
|
7757
|
+
.loadDocumentForId(uid)
|
|
7758
|
+
.snapshotDataStream(FirestoreAccessorStreamMode.STREAM)
|
|
7759
|
+
.pipe(
|
|
7760
|
+
// a user with no document has nothing linked, and a denied read is a rules question this
|
|
7761
|
+
// list has no answer to — both are "no login links", exactly as the connect list treats them
|
|
7762
|
+
catchError((e) => {
|
|
7763
|
+
if (e?.code !== FIRESTORE_PERMISSION_DENIED_ERROR_CODE) {
|
|
7764
|
+
console.error('DbxFirebaseExternalConnectionLinkedLoginMethodsSource: failed reading the connection document: ', e);
|
|
7765
|
+
}
|
|
7766
|
+
return of(undefined);
|
|
7767
|
+
}))
|
|
7768
|
+
: of(undefined)));
|
|
7769
|
+
linkedLoginMethodTypes$ = this._connection$.pipe(map((connection) => dbxFirebaseExternalConnectionLinkedLoginMethodTypes(connection?.li, this._dbxFirebaseExternalConnectionService)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
7770
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxFirebaseExternalConnectionLinkedLoginMethodsSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7771
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxFirebaseExternalConnectionLinkedLoginMethodsSource });
|
|
7772
|
+
}
|
|
7773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxFirebaseExternalConnectionLinkedLoginMethodsSource, decorators: [{
|
|
7774
|
+
type: Injectable
|
|
7775
|
+
}] });
|
|
7776
|
+
|
|
7157
7777
|
/**
|
|
7158
7778
|
* Directive providing a {@link UserExternalConnectionDocumentStore} for a single user's connection document.
|
|
7159
7779
|
*/
|
|
@@ -7173,25 +7793,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
7173
7793
|
}], ctorParameters: () => [] });
|
|
7174
7794
|
|
|
7175
7795
|
/**
|
|
7176
|
-
* Maps the document store's loading state into
|
|
7796
|
+
* Maps the document store's loading state into one of the connection document's provider maps.
|
|
7177
7797
|
*
|
|
7178
7798
|
* This mapper exists because `dataLoadingState$` turns a MISSING document into
|
|
7179
7799
|
* `errorResult(modelDoesNotExistError())` — and a user who has never connected anything has no
|
|
7180
7800
|
* document, which is the common case, not an error. `exists$` catches `permission-denied` but does
|
|
7181
7801
|
* not feed `dataLoadingState$`, so that case has to be handled here too.
|
|
7182
7802
|
*
|
|
7183
|
-
* Both cases mean the same thing to this UI: an empty
|
|
7803
|
+
* Both cases mean the same thing to this UI: an empty map.
|
|
7804
|
+
*
|
|
7805
|
+
* Generalized over WHICH map it projects because the document now carries two — `e` (data
|
|
7806
|
+
* connections) and `li` (login links) — and both want identical missing/denied handling.
|
|
7184
7807
|
*
|
|
7185
7808
|
* Pure and exported so it is unit-testable without a TestBed.
|
|
7186
7809
|
*
|
|
7187
7810
|
* @param state - The document store's data loading state.
|
|
7188
|
-
* @
|
|
7811
|
+
* @param readMap - Reads the map to project off the loaded document.
|
|
7812
|
+
* @returns The loading state of that map.
|
|
7189
7813
|
*/
|
|
7190
|
-
function
|
|
7814
|
+
function externalConnectionMapLoadingStateFromDocumentLoadingState(state, readMap) {
|
|
7191
7815
|
const errorCode = state.error?.code;
|
|
7192
7816
|
let result;
|
|
7193
7817
|
if (state.value) {
|
|
7194
|
-
result = successResult(state.value
|
|
7818
|
+
result = successResult(readMap(state.value) ?? {});
|
|
7195
7819
|
}
|
|
7196
7820
|
else if (errorCode === DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR || errorCode === FIRESTORE_PERMISSION_DENIED_ERROR_CODE) {
|
|
7197
7821
|
result = successResult({});
|
|
@@ -7204,6 +7828,24 @@ function externalConnectionsLoadingStateFromDocumentLoadingState(state) {
|
|
|
7204
7828
|
}
|
|
7205
7829
|
return result;
|
|
7206
7830
|
}
|
|
7831
|
+
/**
|
|
7832
|
+
* Maps the document store's loading state into the per-provider ENTRY map the connect UI renders from.
|
|
7833
|
+
*
|
|
7834
|
+
* @param state - The document store's data loading state.
|
|
7835
|
+
* @returns The loading state of the user's entry map.
|
|
7836
|
+
*/
|
|
7837
|
+
function externalConnectionsLoadingStateFromDocumentLoadingState(state) {
|
|
7838
|
+
return externalConnectionMapLoadingStateFromDocumentLoadingState(state, (x) => x.e);
|
|
7839
|
+
}
|
|
7840
|
+
/**
|
|
7841
|
+
* Maps the document store's loading state into the per-provider LOGIN LINK map.
|
|
7842
|
+
*
|
|
7843
|
+
* @param state - The document store's data loading state.
|
|
7844
|
+
* @returns The loading state of the user's login link map.
|
|
7845
|
+
*/
|
|
7846
|
+
function externalConnectionLoginsLoadingStateFromDocumentLoadingState(state) {
|
|
7847
|
+
return externalConnectionMapLoadingStateFromDocumentLoadingState(state, (x) => x.li);
|
|
7848
|
+
}
|
|
7207
7849
|
/**
|
|
7208
7850
|
* Decides whether a document load means the user has no connection document and needs one created.
|
|
7209
7851
|
*
|
|
@@ -7231,6 +7873,10 @@ class DbxFirebaseUserExternalConnectionsStore {
|
|
|
7231
7873
|
* The user's per-provider entries. A missing document (or a denied read) resolves to an empty map.
|
|
7232
7874
|
*/
|
|
7233
7875
|
entriesLoadingState$ = this.userExternalConnectionDocumentStore.dataLoadingState$.pipe(map(externalConnectionsLoadingStateFromDocumentLoadingState), shareReplay(1));
|
|
7876
|
+
/**
|
|
7877
|
+
* The user's per-provider LOGIN LINKS. A missing document (or a denied read) resolves to an empty map.
|
|
7878
|
+
*/
|
|
7879
|
+
loginsLoadingState$ = this.userExternalConnectionDocumentStore.dataLoadingState$.pipe(map(externalConnectionLoginsLoadingStateFromDocumentLoadingState), shareReplay(1));
|
|
7234
7880
|
/**
|
|
7235
7881
|
* Creates the user's connection document if they do not have one, and does nothing if they do.
|
|
7236
7882
|
*
|
|
@@ -7687,7 +8333,30 @@ function provideDbxFirebaseExternalConnections(config) {
|
|
|
7687
8333
|
{
|
|
7688
8334
|
provide: DbxFirebaseExternalConnectionService,
|
|
7689
8335
|
useClass: DbxFirebaseExternalConnectionService
|
|
7690
|
-
}
|
|
8336
|
+
},
|
|
8337
|
+
{
|
|
8338
|
+
// contributed rather than read directly by `auth/login`, which must not depend on this module —
|
|
8339
|
+
// it is the half that already depends on `auth/login`
|
|
8340
|
+
provide: DBX_FIREBASE_LINKED_LOGIN_METHODS_SOURCES_TOKEN,
|
|
8341
|
+
useClass: DbxFirebaseExternalConnectionLinkedLoginMethodsSource,
|
|
8342
|
+
multi: true
|
|
8343
|
+
},
|
|
8344
|
+
provideAppInitializer(() => {
|
|
8345
|
+
// registered here rather than through `provideDbxFirebaseLogin`'s `additionalProviders` so the
|
|
8346
|
+
// two declarations cannot drift: an app names Discord once, and both the settings row and the
|
|
8347
|
+
// login button follow from it. `override: false` leaves an app's explicit login registration
|
|
8348
|
+
// for the same method type in charge.
|
|
8349
|
+
const loginService = inject(DbxFirebaseAuthLoginService, { optional: true });
|
|
8350
|
+
if (loginService) {
|
|
8351
|
+
dbxFirebaseExternalConnectionLoginProviders(config.providers).forEach((x) => loginService.register(x, false));
|
|
8352
|
+
}
|
|
8353
|
+
if (config.handleSignInRedirectResult ?? true) {
|
|
8354
|
+
// deliberately not awaited: a failed redemption must not block the app from booting, and the
|
|
8355
|
+
// user is already looking at a page that renders fine signed out
|
|
8356
|
+
const externalConnectionService = inject(DbxFirebaseExternalConnectionService);
|
|
8357
|
+
externalConnectionService.handleSignInRedirectResult().catch((e) => console.error('DbxFirebaseExternalConnectionService: failed completing a sign-in redirect: ', e));
|
|
8358
|
+
}
|
|
8359
|
+
})
|
|
7691
8360
|
];
|
|
7692
8361
|
return makeEnvironmentProviders(providers);
|
|
7693
8362
|
}
|
|
@@ -13310,5 +13979,5 @@ function provideDbxFirebase(config) {
|
|
|
13310
13979
|
* Generated bundle index. Do not edit.
|
|
13311
13980
|
*/
|
|
13312
13981
|
|
|
13313
|
-
export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, AbstractDbxFirebaseModelEntityWidgetDirective, AbstractDbxFirebaseNotificationItemWidgetComponent, AbstractRootSingleItemDbxFirebaseDocument, AbstractSingleItemDbxFirebaseDocument, AbstractSystemStateDocumentStoreAccessor, CalendarDocumentStore, CalendarDocumentStoreDirective, DBX_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_COMPONENT_CONFIGURATION, DBX_FIREBASE_APP_OPTIONS_TOKEN, DBX_FIREBASE_AUTH_FLOW_TOKEN, DBX_FIREBASE_DOCUMENT_STORE_CONTEXT_STORE_TOKEN, DBX_FIREBASE_EXTERNAL_CONNECTION_CALCOM_PROVIDER, DBX_FIREBASE_EXTERNAL_CONNECTION_DISCORD_PROVIDER, DBX_FIREBASE_EXTERNAL_CONNECTION_ZOHO_PROVIDER, DBX_FIREBASE_EXTERNAL_CONNECTION_ZOOM_PROVIDER, DBX_FIREBASE_KNOWN_EXTERNAL_CONNECTION_PROVIDERS, DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, DBX_FIREBASE_MODEL_ENTITY_WITH_STORE_TOKEN, DBX_FIREBASE_STORAGEFILE_DOWNLOAD_STORAGE_ACCESSOR_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_TOKEN, DBX_FIREBASE_STORAGE_PDF_MERGE_UPLOAD_FILE_NAME, DBX_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY, DEFAULT_DBX_FIREBASE_AUTH_FLOW, DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE, DEFAULT_DBX_FIREBASE_FORM_SPACE_STEP_BLOCK_COLOR, DEFAULT_DBX_FIREBASE_FORM_SPACE_STEP_BLOCK_COMPLETE_COLOR, DEFAULT_DBX_FIREBASE_FORM_SPACE_STEP_BLOCK_COMPLETE_ICON, DEFAULT_DBX_FIREBASE_FORM_SPACE_SUBMIT_INCOMPLETE_HINT, DEFAULT_DBX_FIREBASE_ID_ROUTER_PARAM_ID_PARAM_KEY, DEFAULT_DBX_FIREBASE_ID_ROUTER_PARAM_KEY_PARAM_KEY, DEFAULT_DBX_FIREBASE_ID_ROUTER_PARAM_USE_PARAM_VALUE, DEFAULT_DBX_FIREBASE_MODEL_ENTITIES_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_MODEL_HISTORY_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_NOTIFICATION_ITEM_STORE_POPOVER_KEY, DEFAULT_DBX_FIREBASE_STORAGE_FILE_LIST_REMOVE_CONFIRM_CONFIG, DEFAULT_EXTERNAL_CONNECTION_AUTHORIZE_PATH_FACTORY, DEFAULT_EXTERNAL_CONNECTION_NAVIGATE_FUNCTION, DEFAULT_EXTERNAL_CONNECTION_NAVIGATE_TIMEOUT, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN, DEFAULT_FIREBASE_COLLECTION_CHANGE_TRIGGER_FUNCTION, DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_POPUP_KEY, DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY, DEFAULT_FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE, DEFAULT_NOTIFICATION_HEALTH_CHECK_PRESENTATION_ENTRIES, DEFAULT_NOTIFICATION_HEALTH_CHECK_PROBE_WATCH_MINUTES, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserEventsListenerService, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthImpersonationDelegate, DbxFirebaseAuthLoginService, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCalendarIcsRotateButtonComponent, DbxFirebaseCalendarIcsRotateComponent, DbxFirebaseCalendarSubscribeDialogComponent, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionChangeTriggerInstance, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseCollectionWithParentStoreDirective, DbxFirebaseDevelopmentDirective, DbxFirebaseDevelopmentModule, DbxFirebaseDevelopmentPopupComponent, DbxFirebaseDevelopmentPopupContentComponent, DbxFirebaseDevelopmentPopupContentForgeFormComponent, DbxFirebaseDevelopmentSchedulerListComponent, DbxFirebaseDevelopmentSchedulerListViewComponent, DbxFirebaseDevelopmentSchedulerListViewItemComponent, DbxFirebaseDevelopmentSchedulerService, DbxFirebaseDevelopmentSchedulerWidgetComponent, DbxFirebaseDevelopmentService, DbxFirebaseDevelopmentWidgetService, DbxFirebaseDocumentLoaderInstance, DbxFirebaseDocumentStoreContextModelEntitiesSourceDirective, DbxFirebaseDocumentStoreContextStore, DbxFirebaseDocumentStoreContextStoreDirective, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreIdFromTwoWayModelKeyDirective, DbxFirebaseDocumentStoreTwoWayKeyProvider, DbxFirebaseDocumentStoreTwoWayModelKeySourceDirective, DbxFirebaseEmailForgeFormComponent, DbxFirebaseEmailRecoveryForgeFormComponent, DbxFirebaseEmulatorService, DbxFirebaseExternalConnectionListComponent, DbxFirebaseExternalConnectionListViewComponent, DbxFirebaseExternalConnectionListViewItemComponent, DbxFirebaseExternalConnectionService, DbxFirebaseExternalConnectionsComponent, DbxFirebaseExternalConnectionsConfig, DbxFirebaseFormSpaceCollectionStoreDirective, DbxFirebaseFormSpaceDocumentStoreDirective, DbxFirebaseFormSpaceListComponent, DbxFirebaseFormSpaceListViewComponent, DbxFirebaseFormSpaceListViewItemComponent, DbxFirebaseFormSpaceModule, DbxFirebaseFormSpaceSectionComponent, DbxFirebaseFormSpaceSlotUploadComponent, DbxFirebaseFormSpaceSlotUploadDirective, DbxFirebaseFormSpaceStepBlockComponent, DbxFirebaseFormSpaceSubmitButtonComponent, DbxFirebaseFormSpaceUploadInitializeDocumentsDirective, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseManageAuthProvidersComponent, DbxFirebaseModelContextService, DbxFirebaseModelEntitiesComponent, DbxFirebaseModelEntitiesDebugWidgetComponent, DbxFirebaseModelEntitiesPopoverButtonComponent, DbxFirebaseModelEntitiesPopoverComponent, DbxFirebaseModelEntitiesSource, DbxFirebaseModelEntitiesWidgetService, DbxFirebaseModelEntitiesWidgetServiceConfig, DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent, DbxFirebaseModelKeyComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModelTrackerService, DbxFirebaseModelTypeInstanceListComponent, DbxFirebaseModelTypeInstanceListViewComponent, DbxFirebaseModelTypeInstanceListViewItemComponent, DbxFirebaseModelTypesService, DbxFirebaseModelTypesServiceConfig, DbxFirebaseModelViewedEventDirective, DbxFirebaseModule, DbxFirebaseNotificationBoxCollectionStoreDirective, DbxFirebaseNotificationBoxDocumentStoreDirective, DbxFirebaseNotificationCollectionStoreDirective, DbxFirebaseNotificationDocumentStoreDirective, DbxFirebaseNotificationHealthCheckComponent, DbxFirebaseNotificationHealthCheckConfig, DbxFirebaseNotificationHealthCheckDialogButtonComponent, DbxFirebaseNotificationHealthCheckDialogComponent, DbxFirebaseNotificationHealthCheckIssueComponent, DbxFirebaseNotificationHealthCheckMethodComponent, DbxFirebaseNotificationHealthCheckPresentationService, DbxFirebaseNotificationHealthCheckPresentationServiceConfig, DbxFirebaseNotificationHealthCheckViewComponent, DbxFirebaseNotificationItemContentComponent, DbxFirebaseNotificationItemDefaultViewComponent, DbxFirebaseNotificationItemListComponent, DbxFirebaseNotificationItemListViewComponent, DbxFirebaseNotificationItemListViewItemComponent, DbxFirebaseNotificationItemStore, DbxFirebaseNotificationItemStorePopoverButtonComponent, DbxFirebaseNotificationItemStorePopoverComponent, DbxFirebaseNotificationItemViewComponent, DbxFirebaseNotificationItemWidgetService, DbxFirebaseNotificationSummaryCollectionStoreDirective, DbxFirebaseNotificationSummaryDocumentStoreDirective, DbxFirebaseNotificationTemplateService, DbxFirebaseNotificationUserCollectionStoreDirective, DbxFirebaseNotificationUserDocumentStoreDirective, DbxFirebaseNotificationUserHealthCheckStore, DbxFirebaseParsedEmulatorsConfig, DbxFirebasePasswordResetComponent, DbxFirebasePasswordResetFormComponent, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageFileCollectionStoreDirective, DbxFirebaseStorageFileDocumentStoreDirective, DbxFirebaseStorageFileDownloadButtonComponent, DbxFirebaseStorageFileDownloadService, DbxFirebaseStorageFileDownloadStorage, DbxFirebaseStorageFileGroupDocumentStoreDirective, DbxFirebaseStorageFileListComponent, DbxFirebaseStorageFileListViewComponent, DbxFirebaseStorageFileListViewItemComponent, DbxFirebaseStorageFileUploadActionHandlerDirective, DbxFirebaseStorageFileUploadInitializeDocumentDirective, DbxFirebaseStorageFileUploadModule, DbxFirebaseStorageFileUploadStore, DbxFirebaseStorageFileUploadStoreDirective, DbxFirebaseStorageFileUploadSyncDirective, DbxFirebaseStoragePdfMergeUploadSyncDirective, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, DbxFirebaseUserExternalConnectionCollections, DbxFirebaseUserExternalConnectionDocumentStoreDirective, DbxFirebaseUserExternalConnectionsStore, DbxFirestoreContextService, DbxLimitedFirebaseDocumentLoaderInstance, FIREBASE_APP_CHECK_TOKEN, FIREBASE_APP_TOKEN, FIREBASE_AUTH_TOKEN, FIREBASE_FIRESTORE_TOKEN, FIREBASE_FUNCTIONS_TOKEN, FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE_PREFIX, FIREBASE_PROVIDER_ID_TO_LOGIN_METHOD_TYPE_MAP, FIREBASE_STORAGE_TOKEN, FlatFirestoreModelKeyPipe, FormSpaceCollectionStore, FormSpaceDocumentStore, IMPORTS_AND_EXPORTS$1 as IMPORTS_AND_EXPORTS, LOGIN_METHOD_TYPE_TO_FIREBASE_PROVIDER_ID_MAP, NOTIFICATION_DELIVERY_METHOD_ICONS, NOTIFICATION_DELIVERY_METHOD_LABELS, NOTIFICATION_DELIVERY_METHOD_SHORT_LABELS, NOTIFICATION_DELIVERY_METHOD_TEST_MESSAGE_LABELS, NOTIFICATION_DELIVERY_METHOD_TEST_MESSAGE_NOUNS, NOTIFICATION_HEALTH_CHECK_PROBE_ISSUE_OUTCOMES, NOTIFICATION_HEALTH_CHECK_STATUS_COLORS, NOTIFICATION_HEALTH_CHECK_STATUS_ICONS, NOTIFICATION_HEALTH_CHECK_STATUS_LABELS, NotificationBoxCollectionStore, NotificationBoxDocumentStore, NotificationCollectionStore, NotificationDocumentStore, NotificationSummaryCollectionStore, NotificationSummaryDocumentStore, NotificationUserCollectionStore, NotificationUserDocumentStore, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, StorageFileCollectionStore, StorageFileDocumentStore, StorageFileGroupDocumentStore, StorageFileUploadFilesError, SystemStateCollectionStore, SystemStateDocumentStore, TwoWayFlatFirestoreModelKeyPipe, UserExternalConnectionDocumentStore, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, createDbxFirebaseAppCheck, createDbxFirebaseAuth, createDbxFirebaseFirestore, createDbxFirebaseFunctions, createDbxFirebaseStorage, dbxFirebaseAuthContextInfo, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseDocumentStoreContextModelEntitiesSourceFactory, dbxFirebaseExternalConnectionProviderForEntry, dbxFirebaseExternalConnectionRowStatusForEntry, dbxFirebaseExternalConnectionRows, dbxFirebaseFormSpaceListItemStatus, dbxFirebaseFormSpaceSectionBlockerHint, dbxFirebaseFormSpaceSubmitIncompleteHint, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstance, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseKnownExternalConnectionProvider, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelEntityWidgetInjectionConfigFactory, dbxFirebaseModelTypesServiceInstance, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseSourceSelectLoadSource, dbxFirebaseStorageFileDownloadServiceCustomSourceFromObs, dbxFirebaseStorageFileImageCompressionFileModifier, dbxFirebaseStorageProvidersContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, dbxWidgetTypeForNotificationTemplateType, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultDbxFirebaseStorageFileDownloadStorageAccessorFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, externalConnectionsLoadingStateFromDocumentLoadingState, firebaseAuthState, firebaseAuthTokenFromUser, firebaseCollectionStoreCreateFunction, firebaseCollectionStoreCrudFunction, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreInvokeFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, firebaseIdToken, firebaseProviderIdToLoginMethodType, isDbxFirebaseModelEntityWithStore, isStandaloneWebApp, keyForDbxFirebaseFormSpaceListValue, keyForDbxFirebaseStorageFileListEntry, limitRawFilesForState, linkDocumentStoreToParentContextStores, loginMethodTypeToFirebaseProviderId, maxUploadFilesForState, modelDoesNotExistError, navigateAndWaitForPageToLeave, notificationHealthCheckProbeIssueLabel, parseDbxFirebaseEmulatorsConfig, provideCalendarFirestoreCollections, provideDbxFirebase, provideDbxFirebaseAnalyticsUserEventsListenerService, provideDbxFirebaseApp, provideDbxFirebaseAuth, provideDbxFirebaseAuthImpersonation, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDevelopment, provideDbxFirebaseDocumentStoreContextStore, provideDbxFirebaseDocumentStoreDirective, provideDbxFirebaseDocumentStoreTwoWayKeyProvider, provideDbxFirebaseExternalConnections, provideDbxFirebaseFormSpaceTypeConfigService, provideDbxFirebaseFunctions, provideDbxFirebaseLogin, provideDbxFirebaseModelContextService, provideDbxFirebaseModelEntitiesWidgetService, provideDbxFirebaseNotifications, provideDbxFirebaseStorageFileService, provideDbxFirestoreCollection, provideFormSpaceFirestoreCollections, provideNotificationFirestoreCollections, provideStorageFileFirestoreCollections, provideSystemStateFirestoreCollections, providedDbxFirebaseStorage, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readValueFromIdToken, resolveDbxFirebaseAuthFlow, setParentStoreEffect, shouldCreateUserExternalConnectionForDocumentLoadingState, stateFromTokenForLoggedInUserFunction, storageFileUploadFiles, storageFileUploadHandler };
|
|
13982
|
+
export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, AbstractDbxFirebaseModelEntityWidgetDirective, AbstractDbxFirebaseNotificationItemWidgetComponent, AbstractRootSingleItemDbxFirebaseDocument, AbstractSingleItemDbxFirebaseDocument, AbstractSystemStateDocumentStoreAccessor, CalendarDocumentStore, CalendarDocumentStoreDirective, DBX_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_COMPONENT_CONFIGURATION, DBX_FIREBASE_APP_OPTIONS_TOKEN, DBX_FIREBASE_AUTH_FLOW_TOKEN, DBX_FIREBASE_DOCUMENT_STORE_CONTEXT_STORE_TOKEN, DBX_FIREBASE_EXTERNAL_CONNECTION_CALCOM_PROVIDER, DBX_FIREBASE_EXTERNAL_CONNECTION_DISCORD_PROVIDER, DBX_FIREBASE_EXTERNAL_CONNECTION_LOGIN_CATEGORY, DBX_FIREBASE_EXTERNAL_CONNECTION_ZOHO_PROVIDER, DBX_FIREBASE_EXTERNAL_CONNECTION_ZOOM_PROVIDER, DBX_FIREBASE_KNOWN_EXTERNAL_CONNECTION_PROVIDERS, DBX_FIREBASE_LINKED_LOGIN_METHODS_SOURCES_TOKEN, DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, DBX_FIREBASE_MODEL_ENTITY_WITH_STORE_TOKEN, DBX_FIREBASE_STORAGEFILE_DOWNLOAD_STORAGE_ACCESSOR_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_TOKEN, DBX_FIREBASE_STORAGE_PDF_MERGE_UPLOAD_FILE_NAME, DBX_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY, DEFAULT_DBX_FIREBASE_AUTH_FLOW, DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE, DEFAULT_DBX_FIREBASE_FORM_SPACE_STEP_BLOCK_COLOR, DEFAULT_DBX_FIREBASE_FORM_SPACE_STEP_BLOCK_COMPLETE_COLOR, DEFAULT_DBX_FIREBASE_FORM_SPACE_STEP_BLOCK_COMPLETE_ICON, DEFAULT_DBX_FIREBASE_FORM_SPACE_SUBMIT_INCOMPLETE_HINT, DEFAULT_DBX_FIREBASE_ID_ROUTER_PARAM_ID_PARAM_KEY, DEFAULT_DBX_FIREBASE_ID_ROUTER_PARAM_KEY_PARAM_KEY, DEFAULT_DBX_FIREBASE_ID_ROUTER_PARAM_USE_PARAM_VALUE, DEFAULT_DBX_FIREBASE_MODEL_ENTITIES_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_MODEL_HISTORY_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_NOTIFICATION_ITEM_STORE_POPOVER_KEY, DEFAULT_DBX_FIREBASE_STORAGE_FILE_LIST_REMOVE_CONFIRM_CONFIG, DEFAULT_EXTERNAL_CONNECTION_AUTHORIZE_PATH_FACTORY, DEFAULT_EXTERNAL_CONNECTION_NAVIGATE_FUNCTION, DEFAULT_EXTERNAL_CONNECTION_NAVIGATE_TIMEOUT, DEFAULT_EXTERNAL_CONNECTION_SIGN_IN_PATH_FACTORY, DEFAULT_EXTERNAL_CONNECTION_TOKEN_PATH_FACTORY, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN, DEFAULT_FIREBASE_COLLECTION_CHANGE_TRIGGER_FUNCTION, DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_POPUP_KEY, DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY, DEFAULT_FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE, DEFAULT_NOTIFICATION_HEALTH_CHECK_PRESENTATION_ENTRIES, DEFAULT_NOTIFICATION_HEALTH_CHECK_PROBE_WATCH_MINUTES, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserEventsListenerService, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthImpersonationDelegate, DbxFirebaseAuthLoginService, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCalendarIcsRotateButtonComponent, DbxFirebaseCalendarIcsRotateComponent, DbxFirebaseCalendarSubscribeDialogComponent, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionChangeTriggerInstance, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseCollectionWithParentStoreDirective, DbxFirebaseDevelopmentDirective, DbxFirebaseDevelopmentModule, DbxFirebaseDevelopmentPopupComponent, DbxFirebaseDevelopmentPopupContentComponent, DbxFirebaseDevelopmentPopupContentForgeFormComponent, DbxFirebaseDevelopmentSchedulerListComponent, DbxFirebaseDevelopmentSchedulerListViewComponent, DbxFirebaseDevelopmentSchedulerListViewItemComponent, DbxFirebaseDevelopmentSchedulerService, DbxFirebaseDevelopmentSchedulerWidgetComponent, DbxFirebaseDevelopmentService, DbxFirebaseDevelopmentWidgetService, DbxFirebaseDocumentLoaderInstance, DbxFirebaseDocumentStoreContextModelEntitiesSourceDirective, DbxFirebaseDocumentStoreContextStore, DbxFirebaseDocumentStoreContextStoreDirective, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreIdFromTwoWayModelKeyDirective, DbxFirebaseDocumentStoreTwoWayKeyProvider, DbxFirebaseDocumentStoreTwoWayModelKeySourceDirective, DbxFirebaseEmailForgeFormComponent, DbxFirebaseEmailRecoveryForgeFormComponent, DbxFirebaseEmulatorService, DbxFirebaseExternalConnectionLinkedLoginMethodsSource, DbxFirebaseExternalConnectionListComponent, DbxFirebaseExternalConnectionListViewComponent, DbxFirebaseExternalConnectionListViewItemComponent, DbxFirebaseExternalConnectionService, DbxFirebaseExternalConnectionsComponent, DbxFirebaseExternalConnectionsConfig, DbxFirebaseFormSpaceCollectionStoreDirective, DbxFirebaseFormSpaceDocumentStoreDirective, DbxFirebaseFormSpaceListComponent, DbxFirebaseFormSpaceListViewComponent, DbxFirebaseFormSpaceListViewItemComponent, DbxFirebaseFormSpaceModule, DbxFirebaseFormSpaceSectionComponent, DbxFirebaseFormSpaceSlotUploadComponent, DbxFirebaseFormSpaceSlotUploadDirective, DbxFirebaseFormSpaceStepBlockComponent, DbxFirebaseFormSpaceSubmitButtonComponent, DbxFirebaseFormSpaceUploadInitializeDocumentsDirective, DbxFirebaseLinkedLoginMethodsService, DbxFirebaseLinkedLoginMethodsSource, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginExternalConnectionComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseManageAuthProvidersComponent, DbxFirebaseModelContextService, DbxFirebaseModelEntitiesComponent, DbxFirebaseModelEntitiesDebugWidgetComponent, DbxFirebaseModelEntitiesPopoverButtonComponent, DbxFirebaseModelEntitiesPopoverComponent, DbxFirebaseModelEntitiesSource, DbxFirebaseModelEntitiesWidgetService, DbxFirebaseModelEntitiesWidgetServiceConfig, DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent, DbxFirebaseModelKeyComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModelTrackerService, DbxFirebaseModelTypeInstanceListComponent, DbxFirebaseModelTypeInstanceListViewComponent, DbxFirebaseModelTypeInstanceListViewItemComponent, DbxFirebaseModelTypesService, DbxFirebaseModelTypesServiceConfig, DbxFirebaseModelViewedEventDirective, DbxFirebaseModule, DbxFirebaseNotificationBoxCollectionStoreDirective, DbxFirebaseNotificationBoxDocumentStoreDirective, DbxFirebaseNotificationCollectionStoreDirective, DbxFirebaseNotificationDocumentStoreDirective, DbxFirebaseNotificationHealthCheckComponent, DbxFirebaseNotificationHealthCheckConfig, DbxFirebaseNotificationHealthCheckDialogButtonComponent, DbxFirebaseNotificationHealthCheckDialogComponent, DbxFirebaseNotificationHealthCheckIssueComponent, DbxFirebaseNotificationHealthCheckMethodComponent, DbxFirebaseNotificationHealthCheckPresentationService, DbxFirebaseNotificationHealthCheckPresentationServiceConfig, DbxFirebaseNotificationHealthCheckViewComponent, DbxFirebaseNotificationItemContentComponent, DbxFirebaseNotificationItemDefaultViewComponent, DbxFirebaseNotificationItemListComponent, DbxFirebaseNotificationItemListViewComponent, DbxFirebaseNotificationItemListViewItemComponent, DbxFirebaseNotificationItemStore, DbxFirebaseNotificationItemStorePopoverButtonComponent, DbxFirebaseNotificationItemStorePopoverComponent, DbxFirebaseNotificationItemViewComponent, DbxFirebaseNotificationItemWidgetService, DbxFirebaseNotificationSummaryCollectionStoreDirective, DbxFirebaseNotificationSummaryDocumentStoreDirective, DbxFirebaseNotificationTemplateService, DbxFirebaseNotificationUserCollectionStoreDirective, DbxFirebaseNotificationUserDocumentStoreDirective, DbxFirebaseNotificationUserHealthCheckStore, DbxFirebaseParsedEmulatorsConfig, DbxFirebasePasswordResetComponent, DbxFirebasePasswordResetFormComponent, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageFileCollectionStoreDirective, DbxFirebaseStorageFileDocumentStoreDirective, DbxFirebaseStorageFileDownloadButtonComponent, DbxFirebaseStorageFileDownloadService, DbxFirebaseStorageFileDownloadStorage, DbxFirebaseStorageFileGroupDocumentStoreDirective, DbxFirebaseStorageFileListComponent, DbxFirebaseStorageFileListViewComponent, DbxFirebaseStorageFileListViewItemComponent, DbxFirebaseStorageFileUploadActionHandlerDirective, DbxFirebaseStorageFileUploadInitializeDocumentDirective, DbxFirebaseStorageFileUploadModule, DbxFirebaseStorageFileUploadStore, DbxFirebaseStorageFileUploadStoreDirective, DbxFirebaseStorageFileUploadSyncDirective, DbxFirebaseStoragePdfMergeUploadSyncDirective, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, DbxFirebaseUserExternalConnectionCollections, DbxFirebaseUserExternalConnectionDocumentStoreDirective, DbxFirebaseUserExternalConnectionsStore, DbxFirestoreContextService, DbxLimitedFirebaseDocumentLoaderInstance, EXTERNAL_CONNECTION_SIGN_IN_ERROR_PARAM, EXTERNAL_CONNECTION_SIGN_IN_TICKET_PARAM, EXTERNAL_CONNECTION_SIGN_IN_VERIFIER_STORAGE_KEY, FIREBASE_APP_CHECK_TOKEN, FIREBASE_APP_TOKEN, FIREBASE_AUTH_TOKEN, FIREBASE_FIRESTORE_TOKEN, FIREBASE_FUNCTIONS_TOKEN, FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE_PREFIX, FIREBASE_PROVIDER_ID_TO_LOGIN_METHOD_TYPE_MAP, FIREBASE_STORAGE_TOKEN, FlatFirestoreModelKeyPipe, FormSpaceCollectionStore, FormSpaceDocumentStore, IMPORTS_AND_EXPORTS$1 as IMPORTS_AND_EXPORTS, LOGIN_METHOD_TYPE_TO_FIREBASE_PROVIDER_ID_MAP, NOTIFICATION_DELIVERY_METHOD_ICONS, NOTIFICATION_DELIVERY_METHOD_LABELS, NOTIFICATION_DELIVERY_METHOD_SHORT_LABELS, NOTIFICATION_DELIVERY_METHOD_TEST_MESSAGE_LABELS, NOTIFICATION_DELIVERY_METHOD_TEST_MESSAGE_NOUNS, NOTIFICATION_HEALTH_CHECK_PROBE_ISSUE_OUTCOMES, NOTIFICATION_HEALTH_CHECK_STATUS_COLORS, NOTIFICATION_HEALTH_CHECK_STATUS_ICONS, NOTIFICATION_HEALTH_CHECK_STATUS_LABELS, NotificationBoxCollectionStore, NotificationBoxDocumentStore, NotificationCollectionStore, NotificationDocumentStore, NotificationSummaryCollectionStore, NotificationSummaryDocumentStore, NotificationUserCollectionStore, NotificationUserDocumentStore, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, StorageFileCollectionStore, StorageFileDocumentStore, StorageFileGroupDocumentStore, StorageFileUploadFilesError, SystemStateCollectionStore, SystemStateDocumentStore, TwoWayFlatFirestoreModelKeyPipe, UserExternalConnectionDocumentStore, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, createDbxFirebaseAppCheck, createDbxFirebaseAuth, createDbxFirebaseFirestore, createDbxFirebaseFunctions, createDbxFirebaseStorage, dbxFirebaseAuthContextInfo, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseDocumentStoreContextModelEntitiesSourceFactory, dbxFirebaseExternalConnectionLinkedLoginMethodTypes, dbxFirebaseExternalConnectionLoginProvider, dbxFirebaseExternalConnectionLoginProviders, dbxFirebaseExternalConnectionProviderForEntry, dbxFirebaseExternalConnectionRowStatusForEntry, dbxFirebaseExternalConnectionRows, dbxFirebaseFormSpaceListItemStatus, dbxFirebaseFormSpaceSectionBlockerHint, dbxFirebaseFormSpaceSubmitIncompleteHint, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstance, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseKnownExternalConnectionProvider, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelEntityWidgetInjectionConfigFactory, dbxFirebaseModelTypesServiceInstance, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseSourceSelectLoadSource, dbxFirebaseStorageFileDownloadServiceCustomSourceFromObs, dbxFirebaseStorageFileImageCompressionFileModifier, dbxFirebaseStorageProvidersContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, dbxWidgetTypeForNotificationTemplateType, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultDbxFirebaseStorageFileDownloadStorageAccessorFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, externalConnectionLoginsLoadingStateFromDocumentLoadingState, externalConnectionMapLoadingStateFromDocumentLoadingState, externalConnectionsLoadingStateFromDocumentLoadingState, firebaseAuthState, firebaseAuthTokenFromUser, firebaseCollectionStoreCreateFunction, firebaseCollectionStoreCrudFunction, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreInvokeFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, firebaseIdToken, firebaseProviderIdToLoginMethodType, isDbxFirebaseModelEntityWithStore, isStandaloneWebApp, keyForDbxFirebaseFormSpaceListValue, keyForDbxFirebaseStorageFileListEntry, limitRawFilesForState, linkDocumentStoreToParentContextStores, loginMethodTypeToFirebaseProviderId, maxUploadFilesForState, mergeDbxFirebaseLinkedLoginMethodTypes, modelDoesNotExistError, navigateAndWaitForPageToLeave, notificationHealthCheckProbeIssueLabel, parseDbxFirebaseEmulatorsConfig, provideCalendarFirestoreCollections, provideDbxFirebase, provideDbxFirebaseAnalyticsUserEventsListenerService, provideDbxFirebaseApp, provideDbxFirebaseAuth, provideDbxFirebaseAuthImpersonation, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDevelopment, provideDbxFirebaseDocumentStoreContextStore, provideDbxFirebaseDocumentStoreDirective, provideDbxFirebaseDocumentStoreTwoWayKeyProvider, provideDbxFirebaseExternalConnections, provideDbxFirebaseFormSpaceTypeConfigService, provideDbxFirebaseFunctions, provideDbxFirebaseLogin, provideDbxFirebaseModelContextService, provideDbxFirebaseModelEntitiesWidgetService, provideDbxFirebaseNotifications, provideDbxFirebaseStorageFileService, provideDbxFirestoreCollection, provideFormSpaceFirestoreCollections, provideNotificationFirestoreCollections, provideStorageFileFirestoreCollections, provideSystemStateFirestoreCollections, providedDbxFirebaseStorage, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readExternalConnectionSignInFailureFromUrl, readExternalConnectionSignInTicketFromUrl, readValueFromIdToken, resolveDbxFirebaseAuthFlow, setParentStoreEffect, shouldCreateUserExternalConnectionForDocumentLoadingState, stateFromTokenForLoggedInUserFunction, storageFileUploadFiles, storageFileUploadHandler };
|
|
13314
13983
|
//# sourceMappingURL=dereekb-dbx-firebase.mjs.map
|