@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
package/dist/node/index.js
CHANGED
package/dist/node/internal.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-35c8d2ed.js');
|
|
6
6
|
var tslib = require('tslib');
|
|
7
7
|
var util = require('@firebase/util');
|
|
8
8
|
var app = require('@firebase/app');
|
|
@@ -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>;
|
|
@@ -2120,8 +2120,9 @@ function _getClientVersion(clientPlatform, frameworks = []) {
|
|
|
2120
2120
|
* limitations under the License.
|
|
2121
2121
|
*/
|
|
2122
2122
|
class AuthImpl {
|
|
2123
|
-
constructor(app, config) {
|
|
2123
|
+
constructor(app, heartbeatServiceProvider, config) {
|
|
2124
2124
|
this.app = app;
|
|
2125
|
+
this.heartbeatServiceProvider = heartbeatServiceProvider;
|
|
2125
2126
|
this.config = config;
|
|
2126
2127
|
this.currentUser = null;
|
|
2127
2128
|
this.emulatorConfig = null;
|
|
@@ -2488,6 +2489,7 @@ class AuthImpl {
|
|
|
2488
2489
|
return this.frameworks;
|
|
2489
2490
|
}
|
|
2490
2491
|
async _getAdditionalHeaders() {
|
|
2492
|
+
var _a;
|
|
2491
2493
|
// Additional headers on every request
|
|
2492
2494
|
const headers = {
|
|
2493
2495
|
["X-Client-Version" /* X_CLIENT_VERSION */]: this.clientVersion,
|
|
@@ -2495,6 +2497,13 @@ class AuthImpl {
|
|
|
2495
2497
|
if (this.app.options.appId) {
|
|
2496
2498
|
headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
|
|
2497
2499
|
}
|
|
2500
|
+
// If the heartbeat service exists, add the heartbeat string
|
|
2501
|
+
const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider.getImmediate({
|
|
2502
|
+
optional: true,
|
|
2503
|
+
})) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader());
|
|
2504
|
+
if (heartbeatsHeader) {
|
|
2505
|
+
headers["X-Firebase-Client" /* X_FIREBASE_CLIENT */] = heartbeatsHeader;
|
|
2506
|
+
}
|
|
2498
2507
|
return headers;
|
|
2499
2508
|
}
|
|
2500
2509
|
}
|
|
@@ -5808,7 +5817,7 @@ function multiFactor(user) {
|
|
|
5808
5817
|
}
|
|
5809
5818
|
|
|
5810
5819
|
var name = "@firebase/auth";
|
|
5811
|
-
var version = "0.19.
|
|
5820
|
+
var version = "0.19.10";
|
|
5812
5821
|
|
|
5813
5822
|
/**
|
|
5814
5823
|
* @license
|
|
@@ -5914,8 +5923,9 @@ function getVersionForPlatform(clientPlatform) {
|
|
|
5914
5923
|
function registerAuth(clientPlatform) {
|
|
5915
5924
|
_registerComponent(new Component("auth" /* AUTH */, (container, { options: deps }) => {
|
|
5916
5925
|
const app = container.getProvider('app').getImmediate();
|
|
5926
|
+
const heartbeatServiceProvider = container.getProvider('heartbeat');
|
|
5917
5927
|
const { apiKey, authDomain } = app.options;
|
|
5918
|
-
return (app => {
|
|
5928
|
+
return ((app, heartbeatServiceProvider) => {
|
|
5919
5929
|
_assert(apiKey && !apiKey.includes(':'), "invalid-api-key" /* INVALID_API_KEY */, { appName: app.name });
|
|
5920
5930
|
// Auth domain is optional if IdP sign in isn't being used
|
|
5921
5931
|
_assert(!(authDomain === null || authDomain === void 0 ? void 0 : authDomain.includes(':')), "argument-error" /* ARGUMENT_ERROR */, {
|
|
@@ -5930,10 +5940,10 @@ function registerAuth(clientPlatform) {
|
|
|
5930
5940
|
apiScheme: "https" /* API_SCHEME */,
|
|
5931
5941
|
sdkClientVersion: _getClientVersion(clientPlatform)
|
|
5932
5942
|
};
|
|
5933
|
-
const authInstance = new AuthImpl(app, config);
|
|
5943
|
+
const authInstance = new AuthImpl(app, heartbeatServiceProvider, config);
|
|
5934
5944
|
_initializeAuthInstance(authInstance, deps);
|
|
5935
5945
|
return authInstance;
|
|
5936
|
-
})(app);
|
|
5946
|
+
})(app, heartbeatServiceProvider);
|
|
5937
5947
|
}, "PUBLIC" /* PUBLIC */)
|
|
5938
5948
|
/**
|
|
5939
5949
|
* Auth can only be initialized by explicitly calling getAuth() or initializeAuth()
|
|
@@ -6034,4 +6044,4 @@ class PhoneMultiFactorGenerator {
|
|
|
6034
6044
|
AuthImpl.prototype.setPersistence = async () => { };
|
|
6035
6045
|
|
|
6036
6046
|
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, _emulatorUrl as aA, _performApiRequest as aB, _isIOS7Or8 as aC, _isIOS as aD, _isAndroid as aE, _createError as aF, _isSafari as aG, _isIframe as aH, _isMobileBrowser as aI, _isIE10 as aJ, UserImpl as aK, AuthImpl as aL, _getClientVersion as aM, FetchProvider as aN, SAMLAuthCredential as aO, 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, _getInstance as ao, _assert as ap, _signInWithCredential as aq, _reauthenticate as ar, _link as as, signInWithIdp as at, _fail as au, debugAssert as av, _persistenceKeyName as aw, _castAuth as ax, FederatedAuthProvider as ay, BaseOAuthProvider 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 };
|
|
6037
|
-
//# sourceMappingURL=index-
|
|
6047
|
+
//# sourceMappingURL=index-a995c608.js.map
|