@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/esm5/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-7f85f824.js';
|
|
2
2
|
import 'tslib';
|
|
3
3
|
import '@firebase/util';
|
|
4
4
|
import '@firebase/app';
|
package/dist/esm5/internal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as ActionCodeOperation,
|
|
1
|
+
import { au as _isIOS, av as _isAndroid, aw as _fail, ax as _getRedirectUrl, ay as debugAssert, az as _getProjectConfig, aA as _isIOS7Or8, aB as _assert, aC as _createError, aD as AuthEventManager, aE as _getInstance, b as browserLocalPersistence, aF as _persistenceKeyName, aG as _clearRedirectOutcomes, a as browserSessionPersistence, aH as _getRedirectResult, aI as _overrideRedirectResult, aJ as _castAuth } from './index-7f85f824.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, aB as _assert, aJ as _castAuth, aw as _fail, aN as _generateEventId, aM as _getClientVersion, aE as _getInstance, aH as _getRedirectResult, aI 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-7f85f824.js';
|
|
3
3
|
import { __awaiter, __generator, __extends } from 'tslib';
|
|
4
4
|
import { querystringDecode } from '@firebase/util';
|
|
5
5
|
import '@firebase/app';
|
|
@@ -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';
|
|
@@ -551,7 +551,7 @@ function _initializeAuthInstance(auth, deps) {
|
|
|
551
551
|
}
|
|
552
552
|
|
|
553
553
|
var name = "@firebase/auth";
|
|
554
|
-
var version = "1.
|
|
554
|
+
var version = "1.4.0-20231107192534";
|
|
555
555
|
|
|
556
556
|
/**
|
|
557
557
|
* @license
|
|
@@ -1754,6 +1754,13 @@ function requestStsToken(auth, refreshToken) {
|
|
|
1754
1754
|
}
|
|
1755
1755
|
});
|
|
1756
1756
|
});
|
|
1757
|
+
}
|
|
1758
|
+
function revokeToken(auth, request) {
|
|
1759
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1760
|
+
return __generator(this, function (_a) {
|
|
1761
|
+
return [2 /*return*/, _performApiRequest(auth, "POST" /* HttpMethod.POST */, "/v2/accounts:revokeToken" /* Endpoint.REVOKE_TOKEN */, _addTidIfNecessary(auth, request))];
|
|
1762
|
+
});
|
|
1763
|
+
});
|
|
1757
1764
|
}
|
|
1758
1765
|
|
|
1759
1766
|
/**
|
|
@@ -3145,6 +3152,37 @@ var AuthImpl = /** @class */ (function () {
|
|
|
3145
3152
|
}
|
|
3146
3153
|
});
|
|
3147
3154
|
};
|
|
3155
|
+
/**
|
|
3156
|
+
* Revokes the given access token. Currently only supports Apple OAuth access tokens.
|
|
3157
|
+
*/
|
|
3158
|
+
AuthImpl.prototype.revokeAccessToken = function (token) {
|
|
3159
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3160
|
+
var idToken, request;
|
|
3161
|
+
return __generator(this, function (_a) {
|
|
3162
|
+
switch (_a.label) {
|
|
3163
|
+
case 0:
|
|
3164
|
+
if (!this.currentUser) return [3 /*break*/, 3];
|
|
3165
|
+
return [4 /*yield*/, this.currentUser.getIdToken()];
|
|
3166
|
+
case 1:
|
|
3167
|
+
idToken = _a.sent();
|
|
3168
|
+
request = {
|
|
3169
|
+
providerId: 'apple.com',
|
|
3170
|
+
tokenType: "ACCESS_TOKEN" /* TokenType.ACCESS_TOKEN */,
|
|
3171
|
+
token: token,
|
|
3172
|
+
idToken: idToken
|
|
3173
|
+
};
|
|
3174
|
+
if (this.tenantId != null) {
|
|
3175
|
+
request.tenantId = this.tenantId;
|
|
3176
|
+
}
|
|
3177
|
+
return [4 /*yield*/, revokeToken(this, request)];
|
|
3178
|
+
case 2:
|
|
3179
|
+
_a.sent();
|
|
3180
|
+
_a.label = 3;
|
|
3181
|
+
case 3: return [2 /*return*/];
|
|
3182
|
+
}
|
|
3183
|
+
});
|
|
3184
|
+
});
|
|
3185
|
+
};
|
|
3148
3186
|
AuthImpl.prototype.toJSON = function () {
|
|
3149
3187
|
var _a;
|
|
3150
3188
|
return {
|
|
@@ -8660,6 +8698,18 @@ function updateCurrentUser(auth, user) {
|
|
|
8660
8698
|
function signOut(auth) {
|
|
8661
8699
|
return getModularInstance(auth).signOut();
|
|
8662
8700
|
}
|
|
8701
|
+
/**
|
|
8702
|
+
* Revokes the given access token. Currently only supports Apple OAuth access tokens.
|
|
8703
|
+
*
|
|
8704
|
+
* @param auth - The {@link Auth} instance.
|
|
8705
|
+
* @param token - The Apple OAuth access token.
|
|
8706
|
+
*
|
|
8707
|
+
* @public
|
|
8708
|
+
*/
|
|
8709
|
+
function revokeAccessToken(auth, token) {
|
|
8710
|
+
var authInternal = _castAuth(auth);
|
|
8711
|
+
return authInternal.revokeAccessToken(token);
|
|
8712
|
+
}
|
|
8663
8713
|
/**
|
|
8664
8714
|
* Deletes and signs out the user.
|
|
8665
8715
|
*
|
|
@@ -9010,5 +9060,5 @@ function getAuth(app) {
|
|
|
9010
9060
|
return auth;
|
|
9011
9061
|
}
|
|
9012
9062
|
|
|
9013
|
-
export { ActionCodeOperation, ActionCodeURL, AuthCredential, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as AuthErrorCodes, EmailAuthCredential, EmailAuthProvider, FacebookAuthProvider, FactorId, GithubAuthProvider, GoogleAuthProvider, OAuthCredential, OAuthProvider, OperationType, PhoneAuthCredential, ProviderId, SAMLAuthProvider, SignInMethod, TwitterAuthProvider, applyActionCode, beforeAuthStateChanged, checkActionCode, confirmPasswordReset, connectAuthEmulator, createUserWithEmailAndPassword, debugErrorMap, deleteUser, fetchSignInMethodsForEmail, getAdditionalUserInfo, getAuth, getIdToken, getIdTokenResult, getMultiFactorResolver, inMemoryPersistence, indexedDBLocalPersistence, initializeAuth, initializeRecaptchaConfig, isSignInWithEmailLink, linkWithCredential, multiFactor, onAuthStateChanged, onIdTokenChanged, parseActionCodeURL, prodErrorMap, reauthenticateWithCredential, reload, sendEmailVerification, sendPasswordResetEmail, sendSignInLinkToEmail, setPersistence, signInAnonymously, signInWithCredential, signInWithCustomToken, signInWithEmailAndPassword, signInWithEmailLink, signOut, unlink, updateCurrentUser, updateEmail, updatePassword, updateProfile, useDeviceLanguage, validatePassword, verifyBeforeUpdateEmail, verifyPasswordResetCode };
|
|
9063
|
+
export { ActionCodeOperation, ActionCodeURL, AuthCredential, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as AuthErrorCodes, EmailAuthCredential, EmailAuthProvider, FacebookAuthProvider, FactorId, GithubAuthProvider, GoogleAuthProvider, OAuthCredential, OAuthProvider, OperationType, PhoneAuthCredential, ProviderId, SAMLAuthProvider, SignInMethod, TwitterAuthProvider, applyActionCode, beforeAuthStateChanged, checkActionCode, confirmPasswordReset, connectAuthEmulator, createUserWithEmailAndPassword, debugErrorMap, deleteUser, fetchSignInMethodsForEmail, getAdditionalUserInfo, getAuth, getIdToken, getIdTokenResult, getMultiFactorResolver, inMemoryPersistence, indexedDBLocalPersistence, initializeAuth, initializeRecaptchaConfig, isSignInWithEmailLink, linkWithCredential, multiFactor, onAuthStateChanged, onIdTokenChanged, parseActionCodeURL, prodErrorMap, reauthenticateWithCredential, reload, revokeAccessToken, sendEmailVerification, sendPasswordResetEmail, sendSignInLinkToEmail, setPersistence, signInAnonymously, signInWithCredential, signInWithCustomToken, signInWithEmailAndPassword, signInWithEmailLink, signOut, unlink, updateCurrentUser, updateEmail, updatePassword, updateProfile, useDeviceLanguage, validatePassword, verifyBeforeUpdateEmail, verifyPasswordResetCode };
|
|
9014
9064
|
//# sourceMappingURL=index.webworker.esm5.js.map
|