Skip to content

Commit ba8f0ff

Browse files
committed
update auth
1 parent 36c1fff commit ba8f0ff

File tree

9 files changed

+31
-0
lines changed

9 files changed

+31
-0
lines changed

packages/auth/src/core/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export {
4848
* ```javascript
4949
* setPersistence(auth, browserSessionPersistence);
5050
* ```
51+
* This method has no effect in Node.js.
5152
*
5253
* @param auth - The {@link Auth} instance.
5354
* @param persistence - The {@link Persistence} to use.

packages/auth/src/model/public_types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ export interface Auth {
193193
* This makes it easy for a user signing in to specify whether their session should be
194194
* remembered or not. It also makes it easier to never persist the Auth state for applications
195195
* that are shared by other users or have sensitive data.
196+
*
197+
* This method has no effect in Node.js.
196198
*
197199
* @example
198200
* ```javascript

packages/auth/src/platform_browser/mfa/assertions/phone.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ export class PhoneMultiFactorGenerator {
8383

8484
/**
8585
* Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor.
86+
*
87+
* This method is not available in Node.js.
8688
*
8789
* @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}.
8890
* @returns A {@link PhoneMultiFactorAssertion} which can be used with

packages/auth/src/platform_browser/popup_redirect.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ class BrowserPopupRedirectResolver implements PopupRedirectResolverInternal {
189189
/**
190190
* An implementation of {@link PopupRedirectResolver} suitable for browser
191191
* based applications.
192+
*
193+
* This method is not available in Node.js.
192194
*
193195
* @public
194196
*/

packages/auth/src/platform_browser/providers/phone.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ import { ProviderId, SignInMethod } from '../../model/enums';
4848
* const userCredential = await signInWithCredential(auth, phoneCredential);
4949
* ```
5050
*
51+
* `PhoneAuthProvider` is not available in Node.js.
52+
*
5153
* @public
5254
*/
5355
export class PhoneAuthProvider {

packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ type TokenCallback = (token: string) => void;
4343

4444
/**
4545
* An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier.
46+
*
47+
* `RecaptchaVerifier` is not available in Node.js.
4648
*
4749
* @public
4850
*/

packages/auth/src/platform_browser/strategies/phone.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ class ConfirmationResultImpl implements ConfirmationResult {
9090
* // Obtain a verificationCode from the user.
9191
* const credential = await confirmationResult.confirm(verificationCode);
9292
* ```
93+
*
94+
* This method is not available in Node.js.
9395
*
9496
* @param auth - The {@link Auth} instance.
9597
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
@@ -115,6 +117,8 @@ export async function signInWithPhoneNumber(
115117

116118
/**
117119
* Links the user account with the given phone number.
120+
*
121+
* This method is not available in Node.js.
118122
*
119123
* @param user - The user.
120124
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
@@ -143,6 +147,8 @@ export async function linkWithPhoneNumber(
143147
* Re-authenticates a user using a fresh phone credential.
144148
*
145149
* @remarks Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts.
150+
*
151+
* This method is not available in Node.js.
146152
*
147153
* @param user - The user.
148154
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
@@ -260,6 +266,8 @@ export async function _verifyPhoneNumber(
260266
* const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode);
261267
* await updatePhoneNumber(user, phoneCredential);
262268
* ```
269+
*
270+
* This method is not available in Node.js.
263271
*
264272
* @param user - The user.
265273
* @param credential - A credential authenticating the new phone number.

packages/auth/src/platform_browser/strategies/popup.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export const _POLL_WINDOW_CLOSE_TIMEOUT = new Delay(2000, 10000);
8282
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
8383
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
8484
*
85+
* This method is not available in Node.js.
8586
*
8687
* @public
8788
*/
@@ -118,6 +119,8 @@ export async function signInWithPopup(
118119
* // Reauthenticate using a popup.
119120
* await reauthenticateWithPopup(result.user, provider);
120121
* ```
122+
*
123+
* This method is not available in Node.js.
121124
*
122125
* @param user - The user.
123126
* @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.
@@ -160,6 +163,8 @@ export async function reauthenticateWithPopup(
160163
* const provider = new FacebookAuthProvider();
161164
* await linkWithPopup(result.user, provider);
162165
* ```
166+
*
167+
* This method is not available in Node.js.
163168
*
164169
* @param user - The user.
165170
* @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.

packages/auth/src/platform_browser/strategies/redirect.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ import { getModularInstance } from '@firebase/util';
7575
* Non-OAuth providers like {@link EmailAuthProvider} will throw an error.
7676
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
7777
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
78+
*
79+
* This method is not available in Node.js.
7880
*
7981
* @public
8082
*/
@@ -136,6 +138,8 @@ export async function _signInWithRedirect(
136138
* Non-OAuth providers like {@link EmailAuthProvider} will throw an error.
137139
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
138140
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
141+
*
142+
* This method is not available in Node.js.
139143
*
140144
* @public
141145
*/
@@ -200,6 +204,7 @@ export async function _reauthenticateWithRedirect(
200204
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
201205
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
202206
*
207+
* This method is not available in Node.js.
203208
*
204209
* @public
205210
*/
@@ -270,6 +275,8 @@ export async function _linkWithRedirect(
270275
* @param auth - The {@link Auth} instance.
271276
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
272277
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
278+
*
279+
* This method is not available in Node.js.
273280
*
274281
* @public
275282
*/

0 commit comments

Comments
 (0)