Skip to content

Commit

Permalink
Docs: mark methods and products that don't work in Node (#7276)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 committed May 26, 2023
1 parent df8604e commit e642fc7
Show file tree
Hide file tree
Showing 41 changed files with 201 additions and 386 deletions.
2 changes: 1 addition & 1 deletion docs-devsite/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk
{% endcomment %}

# analytics package
Firebase Analytics
The Firebase Analytics Web SDK. This SDK does not work in a Node.js environment.

## Functions

Expand Down
4 changes: 3 additions & 1 deletion docs-devsite/app-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ https://github.com/firebase/firebase-js-sdk
{% endcomment %}

# app-check package
Firebase App Check
The Firebase App Check Web SDK.

Firebase App Check does not work in a Node.js environment using `ReCaptchaV3Provider` or `ReCaptchaEnterpriseProvider`<!-- -->, but can be used in Node.js if you use `CustomProvider` and write your own attestation method.

## Functions

Expand Down
2 changes: 2 additions & 0 deletions docs-devsite/auth.auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ This will affect the currently saved Auth session and applies this type of persi

This makes it easy for a user signing in to specify whether their session should be remembered or not. It also makes it easier to never persist the Auth state for applications that are shared by other users or have sensitive data.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down
28 changes: 28 additions & 0 deletions docs-devsite/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,8 @@ Returns a [UserCredential](./auth.usercredential.md#usercredential_interface) fr

If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an error. If no redirect operation was called, returns `null`<!-- -->.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down Expand Up @@ -497,6 +499,8 @@ If initializeRecaptchaConfig() is not invoked, the auth flow will always start w

Thus, by calling this optional method, you will reduce the latency of future auth flows. Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down Expand Up @@ -694,6 +698,8 @@ Changes the type of persistence on the [Auth](./auth.auth.md#auth_interface) ins

This makes it easy for a user signing in to specify whether their session should be remembered or not. It also makes it easier to never persist the `Auth` state for applications that are shared by other users or have sensitive data.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down Expand Up @@ -877,6 +883,8 @@ This method sends a code via SMS to the given phone number, and returns a [Confi

For abuse prevention, this method also requires a [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface)<!-- -->. This SDK includes a reCAPTCHA-based implementation, [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class)<!-- -->. This function can work on other platforms that do not support the [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class) (like React Native), but you need to use a third-party [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface) implementation.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down Expand Up @@ -913,6 +921,8 @@ Authenticates a Firebase client using a popup-based OAuth authentication flow.

If succeeds, returns the signed in user along with the provider's credential. If sign in was unsuccessful, returns an error object containing additional information about the error.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down Expand Up @@ -953,6 +963,8 @@ Authenticates a Firebase client using a full-page redirect flow.

To handle the results and errors for this operation, refer to [getRedirectResult()](./auth.md#getredirectresult)<!-- -->. Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using [signInWithRedirect()](./auth.md#signinwithredirect)<!-- -->.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down Expand Up @@ -1204,6 +1216,8 @@ Promise&lt;[UserCredential](./auth.usercredential.md#usercredential_interface)<!

Links the user account with the given phone number.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand All @@ -1228,6 +1242,8 @@ Links the authenticated provider to the user account using a pop-up based OAuth

If the linking is successful, the returned result will contain the user and the provider's credential.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down Expand Up @@ -1264,6 +1280,8 @@ Links the [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class) to the us

To handle the results and errors for this operation, refer to [getRedirectResult()](./auth.md#getredirectresult)<!-- -->. Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using [linkWithRedirect()](./auth.md#linkwithredirect)<!-- -->.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down Expand Up @@ -1349,6 +1367,8 @@ Re-authenticates a user using a fresh phone credential.

Use before operations such as [updatePassword()](./auth.md#updatepassword) that require tokens from recent sign-in attempts.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand All @@ -1373,6 +1393,8 @@ Reauthenticates the current user with the specified [OAuthProvider](./auth.oauth

If the reauthentication is successful, the returned result will contain the user and the provider's credential.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down Expand Up @@ -1409,6 +1431,8 @@ Reauthenticates the current user with the specified [OAuthProvider](./auth.oauth

To handle the results and errors for this operation, refer to [getRedirectResult()](./auth.md#getredirectresult)<!-- -->. Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using [reauthenticateWithRedirect()](./auth.md#reauthenticatewithredirect)<!-- -->.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down Expand Up @@ -1585,6 +1609,8 @@ Promise&lt;void&gt;

Updates the user's phone number.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down Expand Up @@ -1855,6 +1881,8 @@ browserLocalPersistence: Persistence

An implementation of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) suitable for browser based applications.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down
2 changes: 2 additions & 0 deletions docs-devsite/auth.phoneauthprovider.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ https://github.com/firebase/firebase-js-sdk
# PhoneAuthProvider class
Provider for generating an [PhoneAuthCredential](./auth.phoneauthcredential.md#phoneauthcredential_class)<!-- -->.

`PhoneAuthProvider` does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down
2 changes: 2 additions & 0 deletions docs-devsite/auth.phonemultifactorgenerator.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ static FACTOR_ID: string;

Provides a [PhoneMultiFactorAssertion](./auth.phonemultifactorassertion.md#phonemultifactorassertion_interface) to confirm ownership of the phone second factor.

This method does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down
2 changes: 2 additions & 0 deletions docs-devsite/auth.recaptchaverifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ https://github.com/firebase/firebase-js-sdk
# RecaptchaVerifier class
An [reCAPTCHA](https://www.google.com/recaptcha/)<!-- -->-based application verifier.

`RecaptchaVerifier` does not work in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down
8 changes: 6 additions & 2 deletions docs-devsite/firestore_.firestoresettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export declare interface FirestoreSettings
| Property | Type | Description |
| --- | --- | --- |
| [cacheSizeBytes](./firestore_.firestoresettings.md#firestoresettingscachesizebytes) | number | NOTE: This field will be deprecated in a future major release. Use <code>cache</code> field instead to specify cache size, and other cache configurations.<!-- -->An approximate cache size threshold for the on-disk data. If the cache grows beyond this size, Firestore will start removing data that hasn't been recently used. The size is not a guarantee that the cache will stay below that size, only that if the cache exceeds the given size, cleanup will be attempted.<!-- -->The default value is 40 MB. The threshold must be set to at least 1 MB, and can be set to <code>CACHE_SIZE_UNLIMITED</code> to disable garbage collection. |
| [experimentalAutoDetectLongPolling](./firestore_.firestoresettings.md#firestoresettingsexperimentalautodetectlongpolling) | boolean | Configures the SDK's underlying transport (WebChannel) to automatically detect if long-polling should be used. This is very similar to <code>experimentalForceLongPolling</code>, but only uses long-polling if required.<!-- -->After having had a default value of <code>false</code> since its inception in 2019, the default value of this setting was changed in May 2023 to <code>true</code> in v9.22.0 of the Firebase JavaScript SDK. That is, auto-detection of long polling is now enabled by default. To disable it, set this setting to <code>false</code>, and please open a GitHub issue to share the problems that motivated you disabling long-polling auto-detection. |
| [experimentalForceLongPolling](./firestore_.firestoresettings.md#firestoresettingsexperimentalforcelongpolling) | boolean | Forces the SDKs underlying network transport (WebChannel) to use long-polling. Each response from the backend will be closed immediately after the backend sends data (by default responses are kept open in case the backend has more data to send). This avoids incompatibility issues with certain proxies, antivirus software, etc. that incorrectly buffer traffic indefinitely. Use of this option will cause some performance degradation though.<!-- -->This setting cannot be used with <code>experimentalAutoDetectLongPolling</code> and may be removed in a future release. If you find yourself using it to work around a specific network reliability issue, please tell us about it in https://github.com/firebase/firebase-js-sdk/issues/1674. |
| [experimentalAutoDetectLongPolling](./firestore_.firestoresettings.md#firestoresettingsexperimentalautodetectlongpolling) | boolean | Configures the SDK's underlying transport (WebChannel) to automatically detect if long-polling should be used. This is very similar to <code>experimentalForceLongPolling</code>, but only uses long-polling if required.<!-- -->After having had a default value of <code>false</code> since its inception in 2019, the default value of this setting was changed in May 2023 to <code>true</code> in v9.22.0 of the Firebase JavaScript SDK. That is, auto-detection of long polling is now enabled by default. To disable it, set this setting to <code>false</code>, and please open a GitHub issue to share the problems that motivated you disabling long-polling auto-detection.<!-- -->This setting cannot be used in a Node.js environment. |
| [experimentalForceLongPolling](./firestore_.firestoresettings.md#firestoresettingsexperimentalforcelongpolling) | boolean | Forces the SDKs underlying network transport (WebChannel) to use long-polling. Each response from the backend will be closed immediately after the backend sends data (by default responses are kept open in case the backend has more data to send). This avoids incompatibility issues with certain proxies, antivirus software, etc. that incorrectly buffer traffic indefinitely. Use of this option will cause some performance degradation though.<!-- -->This setting cannot be used with <code>experimentalAutoDetectLongPolling</code> and may be removed in a future release. If you find yourself using it to work around a specific network reliability issue, please tell us about it in https://github.com/firebase/firebase-js-sdk/issues/1674.<!-- -->This setting cannot be used in a Node.js environment. |
| [experimentalLongPollingOptions](./firestore_.firestoresettings.md#firestoresettingsexperimentallongpollingoptions) | [ExperimentalLongPollingOptions](./firestore_.experimentallongpollingoptions.md#experimentallongpollingoptions_interface) | Options that configure the SDKs underlying network transport (WebChannel) when long-polling is used.<!-- -->These options are only used if <code>experimentalForceLongPolling</code> is true or if <code>experimentalAutoDetectLongPolling</code> is true and the auto-detection determined that long-polling was needed. Otherwise, these options have no effect. |
| [host](./firestore_.firestoresettings.md#firestoresettingshost) | string | The hostname to connect to. |
| [ignoreUndefinedProperties](./firestore_.firestoresettings.md#firestoresettingsignoreundefinedproperties) | boolean | Whether to skip nested properties that are set to <code>undefined</code> during object serialization. If set to <code>true</code>, these properties are skipped and not written to Firestore. If set to <code>false</code> or omitted, the SDK throws an exception when it encounters properties of type <code>undefined</code>. |
Expand All @@ -51,6 +51,8 @@ Configures the SDK's underlying transport (WebChannel) to automatically detect i

After having had a default value of `false` since its inception in 2019, the default value of this setting was changed in May 2023 to `true` in v9.22.0 of the Firebase JavaScript SDK. That is, auto-detection of long polling is now enabled by default. To disable it, set this setting to `false`<!-- -->, and please open a GitHub issue to share the problems that motivated you disabling long-polling auto-detection.

This setting cannot be used in a Node.js environment.

<b>Signature:</b>

```typescript
Expand All @@ -63,6 +65,8 @@ Forces the SDK’s underlying network transport (WebChannel) to use long-polling

This setting cannot be used with `experimentalAutoDetectLongPolling` and may be removed in a future release. If you find yourself using it to work around a specific network reliability issue, please tell us about it in https://github.com/firebase/firebase-js-sdk/issues/1674.

This setting cannot be used in a Node.js environment.

<b>Signature:</b>

```typescript
Expand Down
Loading

0 comments on commit e642fc7

Please sign in to comment.