@firebase/auth 0.19.9-canary.e987dac26 → 0.19.10
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/CHANGELOG.md +10 -0
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-93adefc5.js → popup_redirect-0aea9243.js} +29 -15
- package/dist/cordova/popup_redirect-0aea9243.js.map +1 -0
- package/dist/cordova/src/api/index.d.ts +2 -1
- package/dist/cordova/src/core/auth/auth_impl.d.ts +3 -1
- package/dist/cordova/test/helpers/mock_auth.d.ts +5 -0
- package/dist/esm2017/{index-8c58cb89.js → index-f69a28d8.js} +16 -6
- package/dist/esm2017/index-f69a28d8.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/api/index.d.ts +2 -1
- package/dist/esm2017/src/core/auth/auth_impl.d.ts +3 -1
- package/dist/esm2017/test/helpers/mock_auth.d.ts +5 -0
- package/dist/esm5/{index-f7d6fb6f.js → index-f92b2f5a.js} +29 -15
- package/dist/esm5/index-f92b2f5a.js.map +1 -0
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/api/index.d.ts +2 -1
- package/dist/esm5/src/core/auth/auth_impl.d.ts +3 -1
- package/dist/esm5/test/helpers/mock_auth.d.ts +5 -0
- package/dist/index.webworker.esm5.js +28 -14
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/{index-b52d4a00.js → index-35c8d2ed.js} +29 -15
- package/dist/node/index-35c8d2ed.js.map +1 -0
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node/src/api/index.d.ts +2 -1
- package/dist/node/src/core/auth/auth_impl.d.ts +3 -1
- package/dist/node/test/helpers/mock_auth.d.ts +5 -0
- package/dist/node-esm/{index-eb8600c0.js → index-a995c608.js} +16 -6
- package/dist/node-esm/index-a995c608.js.map +1 -0
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +2 -2
- package/dist/node-esm/src/api/index.d.ts +2 -1
- package/dist/node-esm/src/core/auth/auth_impl.d.ts +3 -1
- package/dist/node-esm/test/helpers/mock_auth.d.ts +5 -0
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +1 -1
- package/dist/rn/{phone-c61e906b.js → phone-d5d8976b.js} +29 -15
- package/dist/rn/phone-d5d8976b.js.map +1 -0
- package/dist/rn/src/api/index.d.ts +2 -1
- package/dist/rn/src/core/auth/auth_impl.d.ts +3 -1
- package/dist/rn/test/helpers/mock_auth.d.ts +5 -0
- package/dist/src/api/index.d.ts +2 -1
- package/dist/src/core/auth/auth_impl.d.ts +3 -1
- package/dist/test/helpers/mock_auth.d.ts +5 -0
- package/package.json +6 -6
- package/dist/cordova/popup_redirect-93adefc5.js.map +0 -1
- package/dist/esm2017/index-8c58cb89.js.map +0 -1
- package/dist/esm5/index-f7d6fb6f.js.map +0 -1
- package/dist/node/index-b52d4a00.js.map +0 -1
- package/dist/node-esm/index-eb8600c0.js.map +0 -1
- package/dist/rn/phone-c61e906b.js.map +0 -1
|
@@ -28,7 +28,8 @@ export declare const enum HttpHeader {
|
|
|
28
28
|
CONTENT_TYPE = "Content-Type",
|
|
29
29
|
X_FIREBASE_LOCALE = "X-Firebase-Locale",
|
|
30
30
|
X_CLIENT_VERSION = "X-Client-Version",
|
|
31
|
-
X_FIREBASE_GMPID = "X-Firebase-gmpid"
|
|
31
|
+
X_FIREBASE_GMPID = "X-Firebase-gmpid",
|
|
32
|
+
X_FIREBASE_CLIENT = "X-Firebase-Client"
|
|
32
33
|
}
|
|
33
34
|
export declare const enum Endpoint {
|
|
34
35
|
CREATE_AUTH_URI = "/v1/accounts:createAuthUri",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { _FirebaseService, FirebaseApp } from '@firebase/app';
|
|
18
|
+
import { Provider } from '@firebase/component';
|
|
18
19
|
import { Auth, AuthErrorMap, AuthSettings, EmulatorConfig, NextOrObserver, Persistence, PopupRedirectResolver, User, CompleteFn, ErrorFn, Unsubscribe } from '../../model/public_types';
|
|
19
20
|
import { ErrorFactory } from '@firebase/util';
|
|
20
21
|
import { AuthInternal, ConfigInternal } from '../../model/auth';
|
|
@@ -29,6 +30,7 @@ export declare const enum DefaultConfig {
|
|
|
29
30
|
}
|
|
30
31
|
export declare class AuthImpl implements AuthInternal, _FirebaseService {
|
|
31
32
|
readonly app: FirebaseApp;
|
|
33
|
+
private readonly heartbeatServiceProvider;
|
|
32
34
|
readonly config: ConfigInternal;
|
|
33
35
|
currentUser: User | null;
|
|
34
36
|
emulatorConfig: EmulatorConfig | null;
|
|
@@ -50,7 +52,7 @@ export declare class AuthImpl implements AuthInternal, _FirebaseService {
|
|
|
50
52
|
languageCode: string | null;
|
|
51
53
|
tenantId: string | null;
|
|
52
54
|
settings: AuthSettings;
|
|
53
|
-
constructor(app: FirebaseApp, config: ConfigInternal);
|
|
55
|
+
constructor(app: FirebaseApp, heartbeatServiceProvider: Provider<'heartbeat'>, config: ConfigInternal);
|
|
54
56
|
_initializeWithPersistence(persistenceHierarchy: PersistenceInternal[], popupRedirectResolver?: PopupRedirectResolver): Promise<void>;
|
|
55
57
|
/**
|
|
56
58
|
* If the persistence is changed in another window, the user manager will let us know
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
import { Provider } from '@firebase/component';
|
|
17
18
|
import { PopupRedirectResolver } from '../../src/model/public_types';
|
|
18
19
|
import { AuthImpl } from '../../src/core/auth/auth_impl';
|
|
19
20
|
import { PersistedBlob } from '../../src/core/persistence';
|
|
@@ -28,6 +29,10 @@ export declare const TEST_KEY = "test-api-key";
|
|
|
28
29
|
export interface TestAuth extends AuthImpl {
|
|
29
30
|
persistenceLayer: MockPersistenceLayer;
|
|
30
31
|
}
|
|
32
|
+
export declare const FAKE_HEARTBEAT_CONTROLLER: {
|
|
33
|
+
getHeartbeatsHeader: () => Promise<string>;
|
|
34
|
+
};
|
|
35
|
+
export declare const FAKE_HEARTBEAT_CONTROLLER_PROVIDER: Provider<'heartbeat'>;
|
|
31
36
|
export declare class MockPersistenceLayer extends InMemoryPersistence {
|
|
32
37
|
lastObjectSet: PersistedBlob | null;
|
|
33
38
|
_set(key: string, object: PersistedBlob): Promise<void>;
|
|
@@ -2133,8 +2133,9 @@ function _getClientVersion(clientPlatform, frameworks = []) {
|
|
|
2133
2133
|
* limitations under the License.
|
|
2134
2134
|
*/
|
|
2135
2135
|
class AuthImpl {
|
|
2136
|
-
constructor(app, config) {
|
|
2136
|
+
constructor(app, heartbeatServiceProvider, config) {
|
|
2137
2137
|
this.app = app;
|
|
2138
|
+
this.heartbeatServiceProvider = heartbeatServiceProvider;
|
|
2138
2139
|
this.config = config;
|
|
2139
2140
|
this.currentUser = null;
|
|
2140
2141
|
this.emulatorConfig = null;
|
|
@@ -2501,6 +2502,7 @@ class AuthImpl {
|
|
|
2501
2502
|
return this.frameworks;
|
|
2502
2503
|
}
|
|
2503
2504
|
async _getAdditionalHeaders() {
|
|
2505
|
+
var _a;
|
|
2504
2506
|
// Additional headers on every request
|
|
2505
2507
|
const headers = {
|
|
2506
2508
|
["X-Client-Version" /* X_CLIENT_VERSION */]: this.clientVersion,
|
|
@@ -2508,6 +2510,13 @@ class AuthImpl {
|
|
|
2508
2510
|
if (this.app.options.appId) {
|
|
2509
2511
|
headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
|
|
2510
2512
|
}
|
|
2513
|
+
// If the heartbeat service exists, add the heartbeat string
|
|
2514
|
+
const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider.getImmediate({
|
|
2515
|
+
optional: true,
|
|
2516
|
+
})) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader());
|
|
2517
|
+
if (heartbeatsHeader) {
|
|
2518
|
+
headers["X-Firebase-Client" /* X_FIREBASE_CLIENT */] = heartbeatsHeader;
|
|
2519
|
+
}
|
|
2511
2520
|
return headers;
|
|
2512
2521
|
}
|
|
2513
2522
|
}
|
|
@@ -9133,7 +9142,7 @@ class PhoneMultiFactorGenerator {
|
|
|
9133
9142
|
PhoneMultiFactorGenerator.FACTOR_ID = 'phone';
|
|
9134
9143
|
|
|
9135
9144
|
var name = "@firebase/auth";
|
|
9136
|
-
var version = "0.19.
|
|
9145
|
+
var version = "0.19.10";
|
|
9137
9146
|
|
|
9138
9147
|
/**
|
|
9139
9148
|
* @license
|
|
@@ -9239,8 +9248,9 @@ function getVersionForPlatform(clientPlatform) {
|
|
|
9239
9248
|
function registerAuth(clientPlatform) {
|
|
9240
9249
|
_registerComponent(new Component("auth" /* AUTH */, (container, { options: deps }) => {
|
|
9241
9250
|
const app = container.getProvider('app').getImmediate();
|
|
9251
|
+
const heartbeatServiceProvider = container.getProvider('heartbeat');
|
|
9242
9252
|
const { apiKey, authDomain } = app.options;
|
|
9243
|
-
return (app => {
|
|
9253
|
+
return ((app, heartbeatServiceProvider) => {
|
|
9244
9254
|
_assert(apiKey && !apiKey.includes(':'), "invalid-api-key" /* INVALID_API_KEY */, { appName: app.name });
|
|
9245
9255
|
// Auth domain is optional if IdP sign in isn't being used
|
|
9246
9256
|
_assert(!(authDomain === null || authDomain === void 0 ? void 0 : authDomain.includes(':')), "argument-error" /* ARGUMENT_ERROR */, {
|
|
@@ -9255,10 +9265,10 @@ function registerAuth(clientPlatform) {
|
|
|
9255
9265
|
apiScheme: "https" /* API_SCHEME */,
|
|
9256
9266
|
sdkClientVersion: _getClientVersion(clientPlatform)
|
|
9257
9267
|
};
|
|
9258
|
-
const authInstance = new AuthImpl(app, config);
|
|
9268
|
+
const authInstance = new AuthImpl(app, heartbeatServiceProvider, config);
|
|
9259
9269
|
_initializeAuthInstance(authInstance, deps);
|
|
9260
9270
|
return authInstance;
|
|
9261
|
-
})(app);
|
|
9271
|
+
})(app, heartbeatServiceProvider);
|
|
9262
9272
|
}, "PUBLIC" /* PUBLIC */)
|
|
9263
9273
|
/**
|
|
9264
9274
|
* Auth can only be initialized by explicitly calling getAuth() or initializeAuth()
|
|
@@ -9323,4 +9333,4 @@ function getAuth(app = getApp()) {
|
|
|
9323
9333
|
registerAuth("Browser" /* BROWSER */);
|
|
9324
9334
|
|
|
9325
9335
|
export { sendPasswordResetEmail as $, ActionCodeOperation as A, prodErrorMap as B, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as C, initializeAuth as D, connectAuthEmulator as E, FactorId as F, AuthCredential as G, EmailAuthCredential as H, OAuthCredential as I, PhoneAuthCredential as J, inMemoryPersistence as K, EmailAuthProvider as L, FacebookAuthProvider as M, GoogleAuthProvider as N, OperationType as O, PhoneAuthProvider as P, GithubAuthProvider as Q, RecaptchaVerifier as R, SignInMethod as S, OAuthProvider as T, SAMLAuthProvider as U, TwitterAuthProvider as V, signInAnonymously as W, signInWithCredential as X, linkWithCredential as Y, reauthenticateWithCredential as Z, signInWithCustomToken as _, browserSessionPersistence as a, confirmPasswordReset as a0, applyActionCode as a1, checkActionCode as a2, verifyPasswordResetCode as a3, createUserWithEmailAndPassword as a4, signInWithEmailAndPassword as a5, sendSignInLinkToEmail as a6, isSignInWithEmailLink as a7, signInWithEmailLink as a8, fetchSignInMethodsForEmail as a9, _getRedirectResult as aA, _clearRedirectOutcomes as aB, _castAuth as aC, UserImpl as aD, AuthImpl as aE, _getClientVersion as aF, _generateEventId as aG, AuthPopup as aH, FetchProvider as aI, SAMLAuthCredential as aJ, sendEmailVerification as aa, verifyBeforeUpdateEmail as ab, ActionCodeURL as ac, parseActionCodeURL as ad, updateProfile as ae, updateEmail as af, updatePassword as ag, getIdToken as ah, getIdTokenResult as ai, unlink as aj, getAdditionalUserInfo as ak, reload as al, getMultiFactorResolver as am, multiFactor as an, _isIOS7Or8 as ao, debugAssert as ap, _isIOS as aq, _isAndroid as ar, _fail as as, _getRedirectUrl as at, _getProjectConfig as au, _createError as av, _assert as aw, _getInstance as ax, _persistenceKeyName as ay, AuthEventManager as az, browserLocalPersistence as b, signInWithPopup as c, linkWithPopup as d, reauthenticateWithPopup as e, signInWithRedirect as f, linkWithRedirect as g, reauthenticateWithRedirect as h, indexedDBLocalPersistence as i, getRedirectResult as j, browserPopupRedirectResolver as k, linkWithPhoneNumber as l, PhoneMultiFactorGenerator as m, getAuth as n, ProviderId as o, setPersistence as p, onIdTokenChanged as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, onAuthStateChanged as t, updatePhoneNumber as u, useDeviceLanguage as v, updateCurrentUser as w, signOut as x, deleteUser as y, debugErrorMap as z };
|
|
9326
|
-
//# sourceMappingURL=index-
|
|
9336
|
+
//# sourceMappingURL=index-f69a28d8.js.map
|