@firebase/auth 1.3.2-canary.ff1a6ec2c → 1.4.0-20231107192534
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth-public.d.ts +10 -0
- package/dist/auth.d.ts +11 -0
- package/dist/browser-cjs/{index-605f94d7.js → index-dfd6ff50.js} +37 -2
- package/dist/browser-cjs/index-dfd6ff50.js.map +1 -0
- package/dist/browser-cjs/index.js +2 -1
- package/dist/browser-cjs/index.js.map +1 -1
- package/dist/browser-cjs/internal.js +2 -1
- package/dist/browser-cjs/internal.js.map +1 -1
- package/dist/browser-cjs/src/api/authentication/token.d.ts +13 -2
- package/dist/browser-cjs/src/api/index.d.ts +3 -1
- package/dist/browser-cjs/src/core/auth/auth_impl.d.ts +4 -0
- package/dist/browser-cjs/src/core/index.d.ts +9 -0
- package/dist/browser-cjs/src/model/auth.d.ts +1 -0
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-81d2b7d7.js → popup_redirect-b8968cb1.js} +53 -3
- package/dist/cordova/popup_redirect-b8968cb1.js.map +1 -0
- package/dist/cordova/src/api/authentication/token.d.ts +13 -2
- package/dist/cordova/src/api/index.d.ts +3 -1
- package/dist/cordova/src/core/auth/auth_impl.d.ts +4 -0
- package/dist/cordova/src/core/index.d.ts +9 -0
- package/dist/cordova/src/model/auth.d.ts +1 -0
- package/dist/esm2017/{index-f680024a.js → index-ae3ae6d8.js} +37 -3
- package/dist/esm2017/index-ae3ae6d8.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/api/authentication/token.d.ts +13 -2
- package/dist/esm2017/src/api/index.d.ts +3 -1
- package/dist/esm2017/src/core/auth/auth_impl.d.ts +4 -0
- package/dist/esm2017/src/core/index.d.ts +9 -0
- package/dist/esm2017/src/model/auth.d.ts +1 -0
- package/dist/esm5/{index-a7eab1f1.js → index-7f85f824.js} +53 -3
- package/dist/esm5/index-7f85f824.js.map +1 -0
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/api/authentication/token.d.ts +13 -2
- package/dist/esm5/src/api/index.d.ts +3 -1
- package/dist/esm5/src/core/auth/auth_impl.d.ts +4 -0
- package/dist/esm5/src/core/index.d.ts +9 -0
- package/dist/esm5/src/model/auth.d.ts +1 -0
- package/dist/index.webworker.esm5.js +52 -2
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/index.js +2 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/internal.js +2 -1
- package/dist/node/internal.js.map +1 -1
- package/dist/node/src/api/authentication/token.d.ts +13 -2
- package/dist/node/src/api/index.d.ts +3 -1
- package/dist/node/src/core/auth/auth_impl.d.ts +4 -0
- package/dist/node/src/core/index.d.ts +9 -0
- package/dist/node/src/model/auth.d.ts +1 -0
- package/dist/node/{totp-53cf7541.js → totp-e17814fd.js} +53 -2
- package/dist/node/totp-e17814fd.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/authentication/token.d.ts +13 -2
- package/dist/node-esm/src/api/index.d.ts +3 -1
- package/dist/node-esm/src/core/auth/auth_impl.d.ts +4 -0
- package/dist/node-esm/src/core/index.d.ts +9 -0
- package/dist/node-esm/src/model/auth.d.ts +1 -0
- package/dist/node-esm/{totp-581e665b.js → totp-2585fcd6.js} +37 -3
- package/dist/node-esm/totp-2585fcd6.js.map +1 -0
- package/dist/rn/{index-ef3f08bb.js → index-5104bca5.js} +53 -2
- package/dist/rn/index-5104bca5.js.map +1 -0
- package/dist/rn/index.js +2 -1
- package/dist/rn/index.js.map +1 -1
- package/dist/rn/internal.js +2 -1
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/src/api/authentication/token.d.ts +13 -2
- package/dist/rn/src/api/index.d.ts +3 -1
- package/dist/rn/src/core/auth/auth_impl.d.ts +4 -0
- package/dist/rn/src/core/index.d.ts +9 -0
- package/dist/rn/src/model/auth.d.ts +1 -0
- package/dist/src/api/authentication/token.d.ts +13 -2
- package/dist/src/api/index.d.ts +3 -1
- package/dist/src/core/auth/auth_impl.d.ts +4 -0
- package/dist/src/core/index.d.ts +9 -0
- package/dist/src/model/auth.d.ts +1 -0
- package/package.json +6 -6
- package/dist/browser-cjs/index-605f94d7.js.map +0 -1
- package/dist/cordova/popup_redirect-81d2b7d7.js.map +0 -1
- package/dist/esm2017/index-f680024a.js.map +0 -1
- package/dist/esm5/index-a7eab1f1.js.map +0 -1
- package/dist/node/totp-53cf7541.js.map +0 -1
- package/dist/node-esm/totp-581e665b.js.map +0 -1
- package/dist/rn/index-ef3f08bb.js.map +0 -1
package/dist/esm2017/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ActionCodeOperation,
|
|
1
|
+
export { A as ActionCodeOperation, ai as ActionCodeURL, L as AuthCredential, I as AuthErrorCodes, M as EmailAuthCredential, V as EmailAuthProvider, W as FacebookAuthProvider, F as FactorId, Y as GithubAuthProvider, X as GoogleAuthProvider, N as OAuthCredential, Z as OAuthProvider, O as OperationType, Q as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, _ as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, $ as TwitterAuthProvider, a7 as applyActionCode, x as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a8 as checkActionCode, a6 as confirmPasswordReset, K as connectAuthEmulator, aa as createUserWithEmailAndPassword, G as debugErrorMap, E as deleteUser, af as fetchSignInMethodsForEmail, aq as getAdditionalUserInfo, o as getAuth, an as getIdToken, ao as getIdTokenResult, as as getMultiFactorResolver, j as getRedirectResult, U as inMemoryPersistence, i as indexedDBLocalPersistence, J as initializeAuth, t as initializeRecaptchaConfig, ad as isSignInWithEmailLink, a2 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, at as multiFactor, y as onAuthStateChanged, w as onIdTokenChanged, aj as parseActionCodeURL, H as prodErrorMap, a3 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ar as reload, D as revokeAccessToken, ag as sendEmailVerification, a5 as sendPasswordResetEmail, ac as sendSignInLinkToEmail, q as setPersistence, a0 as signInAnonymously, a1 as signInWithCredential, a4 as signInWithCustomToken, ab as signInWithEmailAndPassword, ae as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, C as signOut, ap as unlink, B as updateCurrentUser, al as updateEmail, am as updatePassword, u as updatePhoneNumber, ak as updateProfile, z as useDeviceLanguage, v as validatePassword, ah as verifyBeforeUpdateEmail, a9 as verifyPasswordResetCode } from './index-ae3ae6d8.js';
|
|
2
2
|
import '@firebase/util';
|
|
3
3
|
import '@firebase/app';
|
|
4
4
|
import '@firebase/logger';
|
package/dist/esm2017/internal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as ActionCodeOperation,
|
|
1
|
+
import { au as debugAssert, av as _isIOS, aw as _isAndroid, ax as _fail, ay as _getRedirectUrl, az as _getProjectConfig, aA as _isIOS7Or8, aB as _createError, aC as _assert, aD as AuthEventManager, aE as _getInstance, b as browserLocalPersistence, aF as _persistenceKeyName, a as browserSessionPersistence, aG as _getRedirectResult, aH as _overrideRedirectResult, aI as _clearRedirectOutcomes, aJ as _castAuth } from './index-ae3ae6d8.js';
|
|
2
|
+
export { A as ActionCodeOperation, ai as ActionCodeURL, L as AuthCredential, I as AuthErrorCodes, aL as AuthImpl, aO as AuthPopup, M as EmailAuthCredential, V as EmailAuthProvider, W as FacebookAuthProvider, F as FactorId, aP as FetchProvider, Y as GithubAuthProvider, X as GoogleAuthProvider, N as OAuthCredential, Z as OAuthProvider, O as OperationType, Q as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, aQ as SAMLAuthCredential, _ as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, $ as TwitterAuthProvider, aK as UserImpl, aC as _assert, aJ as _castAuth, ax as _fail, aN as _generateEventId, aM as _getClientVersion, aE as _getInstance, aG as _getRedirectResult, aH as _overrideRedirectResult, aF as _persistenceKeyName, a7 as applyActionCode, x as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a8 as checkActionCode, a6 as confirmPasswordReset, K as connectAuthEmulator, aa as createUserWithEmailAndPassword, G as debugErrorMap, E as deleteUser, af as fetchSignInMethodsForEmail, aq as getAdditionalUserInfo, o as getAuth, an as getIdToken, ao as getIdTokenResult, as as getMultiFactorResolver, j as getRedirectResult, U as inMemoryPersistence, i as indexedDBLocalPersistence, J as initializeAuth, t as initializeRecaptchaConfig, ad as isSignInWithEmailLink, a2 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, at as multiFactor, y as onAuthStateChanged, w as onIdTokenChanged, aj as parseActionCodeURL, H as prodErrorMap, a3 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ar as reload, D as revokeAccessToken, ag as sendEmailVerification, a5 as sendPasswordResetEmail, ac as sendSignInLinkToEmail, q as setPersistence, a0 as signInAnonymously, a1 as signInWithCredential, a4 as signInWithCustomToken, ab as signInWithEmailAndPassword, ae as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, C as signOut, ap as unlink, B as updateCurrentUser, al as updateEmail, am as updatePassword, u as updatePhoneNumber, ak as updateProfile, z as useDeviceLanguage, v as validatePassword, ah as verifyBeforeUpdateEmail, a9 as verifyPasswordResetCode } from './index-ae3ae6d8.js';
|
|
3
3
|
import { querystringDecode } from '@firebase/util';
|
|
4
4
|
import '@firebase/app';
|
|
5
5
|
import '@firebase/logger';
|
|
@@ -15,12 +15,23 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { Auth } from '../../model/public_types';
|
|
18
|
-
export declare const enum
|
|
19
|
-
|
|
18
|
+
export declare const enum TokenType {
|
|
19
|
+
REFRESH_TOKEN = "REFRESH_TOKEN",
|
|
20
|
+
ACCESS_TOKEN = "ACCESS_TOKEN"
|
|
20
21
|
}
|
|
21
22
|
export interface RequestStsTokenResponse {
|
|
22
23
|
accessToken: string;
|
|
23
24
|
expiresIn: string;
|
|
24
25
|
refreshToken: string;
|
|
25
26
|
}
|
|
27
|
+
export interface RevokeTokenRequest {
|
|
28
|
+
providerId: string;
|
|
29
|
+
tokenType: TokenType;
|
|
30
|
+
token: string;
|
|
31
|
+
idToken: string;
|
|
32
|
+
tenantId?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface RevokeTokenResponse {
|
|
35
|
+
}
|
|
26
36
|
export declare function requestStsToken(auth: Auth, refreshToken: string): Promise<RequestStsTokenResponse>;
|
|
37
|
+
export declare function revokeToken(auth: Auth, request: RevokeTokenRequest): Promise<RevokeTokenResponse>;
|
|
@@ -54,7 +54,9 @@ export declare const enum Endpoint {
|
|
|
54
54
|
WITHDRAW_MFA = "/v2/accounts/mfaEnrollment:withdraw",
|
|
55
55
|
GET_PROJECT_CONFIG = "/v1/projects",
|
|
56
56
|
GET_RECAPTCHA_CONFIG = "/v2/recaptchaConfig",
|
|
57
|
-
GET_PASSWORD_POLICY = "/v2/passwordPolicy"
|
|
57
|
+
GET_PASSWORD_POLICY = "/v2/passwordPolicy",
|
|
58
|
+
TOKEN = "/v1/token",
|
|
59
|
+
REVOKE_TOKEN = "/v2/accounts:revokeToken"
|
|
58
60
|
}
|
|
59
61
|
export declare const enum RecaptchaClientType {
|
|
60
62
|
WEB = "CLIENT_TYPE_WEB",
|
|
@@ -87,6 +87,10 @@ export declare class AuthImpl implements AuthInternal, _FirebaseService {
|
|
|
87
87
|
beforeAuthStateChanged(callback: (user: User | null) => void | Promise<void>, onAbort?: () => void): Unsubscribe;
|
|
88
88
|
onIdTokenChanged(nextOrObserver: NextOrObserver<User>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
|
|
89
89
|
authStateReady(): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Revokes the given access token. Currently only supports Apple OAuth access tokens.
|
|
92
|
+
*/
|
|
93
|
+
revokeAccessToken(token: string): Promise<void>;
|
|
90
94
|
toJSON(): object;
|
|
91
95
|
_setRedirectUser(user: UserInternal | null, popupRedirectResolver?: PopupRedirectResolver): Promise<void>;
|
|
92
96
|
private getOrInitRedirectPersistenceManager;
|
|
@@ -171,6 +171,15 @@ export declare function updateCurrentUser(auth: Auth, user: User | null): Promis
|
|
|
171
171
|
* @public
|
|
172
172
|
*/
|
|
173
173
|
export declare function signOut(auth: Auth): Promise<void>;
|
|
174
|
+
/**
|
|
175
|
+
* Revokes the given access token. Currently only supports Apple OAuth access tokens.
|
|
176
|
+
*
|
|
177
|
+
* @param auth - The {@link Auth} instance.
|
|
178
|
+
* @param token - The Apple OAuth access token.
|
|
179
|
+
*
|
|
180
|
+
* @public
|
|
181
|
+
*/
|
|
182
|
+
export declare function revokeAccessToken(auth: Auth, token: string): Promise<void>;
|
|
174
183
|
export { initializeAuth } from './auth/initialize';
|
|
175
184
|
export { connectAuthEmulator } from './auth/emulator';
|
|
176
185
|
export { AuthCredential } from './credentials';
|
|
@@ -1728,6 +1728,13 @@ function requestStsToken(auth, refreshToken) {
|
|
|
1728
1728
|
}
|
|
1729
1729
|
});
|
|
1730
1730
|
});
|
|
1731
|
+
}
|
|
1732
|
+
function revokeToken(auth, request) {
|
|
1733
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1734
|
+
return __generator(this, function (_a) {
|
|
1735
|
+
return [2 /*return*/, _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v2/accounts:revokeToken" /* Endpoint.REVOKE_TOKEN */, _addTidIfNecessary(auth, request))];
|
|
1736
|
+
});
|
|
1737
|
+
});
|
|
1731
1738
|
}
|
|
1732
1739
|
|
|
1733
1740
|
/**
|
|
@@ -3330,6 +3337,37 @@ var AuthImpl = /** @class */ (function () {
|
|
|
3330
3337
|
}
|
|
3331
3338
|
});
|
|
3332
3339
|
};
|
|
3340
|
+
/**
|
|
3341
|
+
* Revokes the given access token. Currently only supports Apple OAuth access tokens.
|
|
3342
|
+
*/
|
|
3343
|
+
AuthImpl.prototype.revokeAccessToken = function (token) {
|
|
3344
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3345
|
+
var idToken, request;
|
|
3346
|
+
return __generator(this, function (_a) {
|
|
3347
|
+
switch (_a.label) {
|
|
3348
|
+
case 0:
|
|
3349
|
+
if (!this.currentUser) return [3 /*break*/, 3];
|
|
3350
|
+
return [4 /*yield*/, this.currentUser.getIdToken()];
|
|
3351
|
+
case 1:
|
|
3352
|
+
idToken = _a.sent();
|
|
3353
|
+
request = {
|
|
3354
|
+
providerId: 'apple.com',
|
|
3355
|
+
tokenType: "ACCESS_TOKEN" /* TokenType.ACCESS_TOKEN */,
|
|
3356
|
+
token: token,
|
|
3357
|
+
idToken: idToken
|
|
3358
|
+
};
|
|
3359
|
+
if (this.tenantId != null) {
|
|
3360
|
+
request.tenantId = this.tenantId;
|
|
3361
|
+
}
|
|
3362
|
+
return [4 /*yield*/, revokeToken(this, request)];
|
|
3363
|
+
case 2:
|
|
3364
|
+
_a.sent();
|
|
3365
|
+
_a.label = 3;
|
|
3366
|
+
case 3: return [2 /*return*/];
|
|
3367
|
+
}
|
|
3368
|
+
});
|
|
3369
|
+
});
|
|
3370
|
+
};
|
|
3333
3371
|
AuthImpl.prototype.toJSON = function () {
|
|
3334
3372
|
var _a;
|
|
3335
3373
|
return {
|
|
@@ -7662,6 +7700,18 @@ function updateCurrentUser(auth, user) {
|
|
|
7662
7700
|
function signOut(auth) {
|
|
7663
7701
|
return getModularInstance(auth).signOut();
|
|
7664
7702
|
}
|
|
7703
|
+
/**
|
|
7704
|
+
* Revokes the given access token. Currently only supports Apple OAuth access tokens.
|
|
7705
|
+
*
|
|
7706
|
+
* @param auth - The {@link Auth} instance.
|
|
7707
|
+
* @param token - The Apple OAuth access token.
|
|
7708
|
+
*
|
|
7709
|
+
* @public
|
|
7710
|
+
*/
|
|
7711
|
+
function revokeAccessToken(auth, token) {
|
|
7712
|
+
var authInternal = _castAuth(auth);
|
|
7713
|
+
return authInternal.revokeAccessToken(token);
|
|
7714
|
+
}
|
|
7665
7715
|
/**
|
|
7666
7716
|
* Deletes and signs out the user.
|
|
7667
7717
|
*
|
|
@@ -12195,7 +12245,7 @@ function _isEmptyString(input) {
|
|
|
12195
12245
|
}
|
|
12196
12246
|
|
|
12197
12247
|
var name = "@firebase/auth";
|
|
12198
|
-
var version = "1.
|
|
12248
|
+
var version = "1.4.0-20231107192534";
|
|
12199
12249
|
|
|
12200
12250
|
/**
|
|
12201
12251
|
* @license
|
|
@@ -12447,5 +12497,5 @@ function getAuth(app) {
|
|
|
12447
12497
|
}
|
|
12448
12498
|
registerAuth("Browser" /* ClientPlatform.BROWSER */);
|
|
12449
12499
|
|
|
12450
|
-
export {
|
|
12451
|
-
//# sourceMappingURL=index-
|
|
12500
|
+
export { TwitterAuthProvider as $, ActionCodeOperation as A, updateCurrentUser as B, signOut as C, revokeAccessToken as D, deleteUser as E, FactorId as F, debugErrorMap as G, prodErrorMap as H, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as I, initializeAuth as J, connectAuthEmulator as K, AuthCredential as L, EmailAuthCredential as M, OAuthCredential as N, OperationType as O, PhoneAuthProvider as P, PhoneAuthCredential as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, inMemoryPersistence as U, EmailAuthProvider as V, FacebookAuthProvider as W, GoogleAuthProvider as X, GithubAuthProvider as Y, OAuthProvider as Z, SAMLAuthProvider as _, browserSessionPersistence as a, signInAnonymously as a0, signInWithCredential as a1, linkWithCredential as a2, reauthenticateWithCredential as a3, signInWithCustomToken as a4, sendPasswordResetEmail as a5, confirmPasswordReset as a6, applyActionCode as a7, checkActionCode as a8, verifyPasswordResetCode as a9, _isIOS7Or8 as aA, _assert as aB, _createError as aC, AuthEventManager as aD, _getInstance as aE, _persistenceKeyName as aF, _clearRedirectOutcomes as aG, _getRedirectResult as aH, _overrideRedirectResult as aI, _castAuth as aJ, UserImpl as aK, AuthImpl as aL, _getClientVersion as aM, _generateEventId as aN, AuthPopup as aO, FetchProvider as aP, SAMLAuthCredential as aQ, createUserWithEmailAndPassword as aa, signInWithEmailAndPassword as ab, sendSignInLinkToEmail as ac, isSignInWithEmailLink as ad, signInWithEmailLink as ae, fetchSignInMethodsForEmail as af, sendEmailVerification as ag, verifyBeforeUpdateEmail as ah, ActionCodeURL as ai, parseActionCodeURL as aj, updateProfile as ak, updateEmail as al, updatePassword as am, getIdToken as an, getIdTokenResult as ao, unlink as ap, getAdditionalUserInfo as aq, reload as ar, getMultiFactorResolver as as, multiFactor as at, _isIOS as au, _isAndroid as av, _fail as aw, _getRedirectUrl as ax, debugAssert as ay, _getProjectConfig 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, TotpSecret as n, getAuth as o, ProviderId as p, setPersistence as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, initializeRecaptchaConfig as t, updatePhoneNumber as u, validatePassword as v, onIdTokenChanged as w, beforeAuthStateChanged as x, onAuthStateChanged as y, useDeviceLanguage as z };
|
|
12501
|
+
//# sourceMappingURL=index-7f85f824.js.map
|