Skip to content

Commit 0648f80

Browse files
committed
Add documentation for @firebase/auth-exp
1 parent 2c1764d commit 0648f80

File tree

181 files changed

+2082
-951
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+2082
-951
lines changed

common/api-review/auth-exp.api.md

+72-90
Large diffs are not rendered by default.

common/api-review/auth-types-exp.api.md

+3
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,10 @@ export interface Persistence {
247247

248248
// @public
249249
export abstract class PhoneAuthCredential extends AuthCredential {
250+
// (undocumented)
250251
static fromJSON(json: object | string): PhoneAuthCredential | null;
252+
// (undocumented)
253+
toJSON(): object;
251254
}
252255

253256
// @public

common/api-review/functions-exp.api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function getFunctions(app: FirebaseApp, regionOrCustomDomain?: string): F
1616
export function httpsCallable(functionsInstance: Functions, name: string, options?: HttpsCallableOptions): HttpsCallable;
1717

1818
// @public
19-
export function useFunctionsEmulator(functionsInstance: Functions, origin: string): void;
19+
export function useFunctionsEmulator(functionsInstance: Functions, host: string, port: number): void;
2020

2121

2222
// (No @packageDocumentation comment for this package)

docs-exp/auth-types.applicationverifier.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## ApplicationVerifier interface
66

7-
A verifier for domain verification and abuse prevention. Currently, the only implementation is [RecaptchaVerifier](./auth-types.recaptchaverifier.md)<!-- -->.
7+
A verifier for domain verification and abuse prevention. Currently, the only implementation is [RecaptchaVerifier](./auth.recaptchaverifier.md)<!-- -->.
88

99
<b>Signature:</b>
1010

docs-exp/auth-types.auth.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface Auth
3333
| [onIdTokenChanged(nextOrObserver, error, completed)](./auth-types.auth.onidtokenchanged.md) | Adds an observer for changes to the signed-in user's ID token, which includes sign-in, sign-out, and token refresh events. |
3434
| [setPersistence(persistence)](./auth-types.auth.setpersistence.md) | Changes the type of persistence on the Auth instance for the currently saved Auth session and applies this type of persistence for future sign-in requests, including sign-in with redirect requests.<!-- -->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. |
3535
| [signOut()](./auth-types.auth.signout.md) | Signs out the current user. |
36-
| [updateCurrentUser(user)](./auth-types.auth.updatecurrentuser.md) | Asynchronously sets the provided user as <code>currentUser</code> on the Auth instance. A new instance copy of the user provided will be made and set as currentUser.<!-- -->This will trigger [Auth.onAuthStateChanged()](./auth-types.auth.onauthstatechanged.md) and [Auth.onIdTokenChanged()](./auth-types.auth.onidtokenchanged.md) listeners like other sign in methods.<!-- -->The operation fails with an error if the user to be updated belongs to a different Firebase project. |
36+
| [updateCurrentUser(user)](./auth-types.auth.updatecurrentuser.md) | Asynchronously sets the provided user as [Auth.currentUser](./auth-types.auth.currentuser.md) on the [Auth](./auth-types.auth.md) instance. A new instance copy of the user provided will be made and set as currentUser.<!-- -->This will trigger [Auth.onAuthStateChanged()](./auth-types.auth.onauthstatechanged.md) and [Auth.onIdTokenChanged()](./auth-types.auth.onidtokenchanged.md) listeners like other sign in methods.<!-- -->The operation fails with an error if the user to be updated belongs to a different Firebase project. |
3737
| [useDeviceLanguage()](./auth-types.auth.usedevicelanguage.md) | Sets the current language to the default device/browser preference. |
38-
| [useEmulator(url)](./auth-types.auth.useemulator.md) | Modify this Auth instance to communicate with the Firebase Auth emulator. This must be called synchronously immediately following the first call to <code>initializeAuth()</code>. Do not use with production credentials as emulator traffic is not encrypted. |
38+
| [useEmulator(url)](./auth-types.auth.useemulator.md) | Modify this Auth instance to communicate with the Firebase Auth emulator. This must be called synchronously immediately following the first call to [initializeAuth()](./auth.initializeauth.md)<!-- -->. Do not use with production credentials as emulator traffic is not encrypted. |
3939

docs-exp/auth-types.auth.updatecurrentuser.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Auth.updateCurrentUser() method
66

7-
Asynchronously sets the provided user as `currentUser` on the Auth instance. A new instance copy of the user provided will be made and set as currentUser.
7+
Asynchronously sets the provided user as [Auth.currentUser](./auth-types.auth.currentuser.md) on the [Auth](./auth-types.auth.md) instance. A new instance copy of the user provided will be made and set as currentUser.
88

99
This will trigger [Auth.onAuthStateChanged()](./auth-types.auth.onauthstatechanged.md) and [Auth.onIdTokenChanged()](./auth-types.auth.onidtokenchanged.md) listeners like other sign in methods.
1010

docs-exp/auth-types.auth.useemulator.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Auth.useEmulator() method
66

7-
Modify this Auth instance to communicate with the Firebase Auth emulator. This must be called synchronously immediately following the first call to `initializeAuth()`<!-- -->. Do not use with production credentials as emulator traffic is not encrypted.
7+
Modify this Auth instance to communicate with the Firebase Auth emulator. This must be called synchronously immediately following the first call to [initializeAuth()](./auth.initializeauth.md)<!-- -->. Do not use with production credentials as emulator traffic is not encrypted.
88

99
<b>Signature:</b>
1010

docs-exp/auth-types.authcredential.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## AuthCredential class
66

7-
Interface that represents the credentials returned by an auth provider. Implementations specify the details about each auth provider's credential requirements.
7+
Interface that represents the credentials returned by an [AuthProvider](./auth-types.authprovider.md)<!-- -->. Implementations specify the details about each auth provider's credential requirements.
88

99
<b>Signature:</b>
1010

@@ -17,7 +17,7 @@ export abstract class AuthCredential
1717
| Property | Modifiers | Type | Description |
1818
| --- | --- | --- | --- |
1919
| [providerId](./auth-types.authcredential.providerid.md) | | string | The authentication provider ID for the credential. For example, 'facebook.com', or 'google.com'. |
20-
| [signInMethod](./auth-types.authcredential.signinmethod.md) | | string | The authentication sign in method for the credential. For example, [SignInMethod.EMAIL\_PASSWORD](./auth-types.signinmethod.email_password.md)<!-- -->, or [SignInMethod.EMAIL\_LINK](./auth-types.signinmethod.email_link.md)<!-- -->. This corresponds to the sign-in method identifier as returned in <code>fetchSignInMethodsForEmail</code>. |
20+
| [signInMethod](./auth-types.authcredential.signinmethod.md) | | string | The authentication sign in method for the credential. For example, [SignInMethod.EMAIL\_PASSWORD](./auth-types.signinmethod.email_password.md)<!-- -->, or [SignInMethod.EMAIL\_LINK](./auth-types.signinmethod.email_link.md)<!-- -->. This corresponds to the sign-in method identifier as returned in [fetchSignInMethodsForEmail()](./auth.fetchsigninmethodsforemail.md)<!-- -->. |
2121

2222
## Methods
2323

docs-exp/auth-types.authcredential.signinmethod.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## AuthCredential.signInMethod property
66

7-
The authentication sign in method for the credential. For example, [SignInMethod.EMAIL\_PASSWORD](./auth-types.signinmethod.email_password.md)<!-- -->, or [SignInMethod.EMAIL\_LINK](./auth-types.signinmethod.email_link.md)<!-- -->. This corresponds to the sign-in method identifier as returned in `fetchSignInMethodsForEmail`<!-- -->.
7+
The authentication sign in method for the credential. For example, [SignInMethod.EMAIL\_PASSWORD](./auth-types.signinmethod.email_password.md)<!-- -->, or [SignInMethod.EMAIL\_LINK](./auth-types.signinmethod.email_link.md)<!-- -->. This corresponds to the sign-in method identifier as returned in [fetchSignInMethodsForEmail()](./auth.fetchsigninmethodsforemail.md)<!-- -->.
88

99
<b>Signature:</b>
1010

docs-exp/auth-types.autherror.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ export interface AuthError extends FirebaseError
1919
| [appName](./auth-types.autherror.appname.md) | string | The name of the Firebase App which triggered this error. |
2020
| [email](./auth-types.autherror.email.md) | string | The email of the user's account, used for sign-in/linking. |
2121
| [phoneNumber](./auth-types.autherror.phonenumber.md) | string | The phone number of the user's account, used for sign-in/linking. |
22-
| [tenantid](./auth-types.autherror.tenantid.md) | string | The tenant ID being used for sign-in/linking. If you use <code>signInWithRedirect</code> to sign in, you have to set the tenant ID on [Auth](./auth-types.auth.md) instance again as the tenant ID is not persisted after redirection. |
22+
| [tenantid](./auth-types.autherror.tenantid.md) | string | The tenant ID being used for sign-in/linking. If you use [signInWithRedirect()](./auth.signinwithredirect.md) to sign in, you have to set the tenant ID on [Auth](./auth-types.auth.md) instance again as the tenant ID is not persisted after redirection. |
2323

docs-exp/auth-types.autherror.tenantid.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## AuthError.tenantid property
66

7-
The tenant ID being used for sign-in/linking. If you use `signInWithRedirect` to sign in, you have to set the tenant ID on [Auth](./auth-types.auth.md) instance again as the tenant ID is not persisted after redirection.
7+
The tenant ID being used for sign-in/linking. If you use [signInWithRedirect()](./auth.signinwithredirect.md) to sign in, you have to set the tenant ID on [Auth](./auth-types.auth.md) instance again as the tenant ID is not persisted after redirection.
88

99
<b>Signature:</b>
1010

docs-exp/auth-types.emailauthprovider.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## EmailAuthProvider class
66

7-
Email and password auth provider implementation.
7+
Provider for generating [EmailAuthCredential](./auth.emailauthcredential.md)<!-- -->.
88

99
<b>Signature:</b>
1010

docs-exp/auth-types.idtokenresult.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## IdTokenResult interface
66

7-
Interface representing ID token result obtained from `getIdTokenResult`<!-- -->. It contains the ID token JWT string and other helper properties for getting different data associated with the token as well as all the decoded payload claims.
7+
Interface representing ID token result obtained from [User.getIdTokenResult()](./auth-types.user.getidtokenresult.md)<!-- -->. It contains the ID token JWT string and other helper properties for getting different data associated with the token as well as all the decoded payload claims.
88

99
Note that these claims are not to be trusted as they are parsed client side. Only server side verification can guarantee the integrity of the token claims.
1010

docs-exp/auth-types.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
| Class | Description |
1010
| --- | --- |
1111
| [ActionCodeURL](./auth-types.actioncodeurl.md) | A utility class to parse email action URLs such as password reset, email verification, email link sign in, etc. |
12-
| [AuthCredential](./auth-types.authcredential.md) | Interface that represents the credentials returned by an auth provider. Implementations specify the details about each auth provider's credential requirements. |
13-
| [EmailAuthProvider](./auth-types.emailauthprovider.md) | Email and password auth provider implementation. |
12+
| [AuthCredential](./auth-types.authcredential.md) | Interface that represents the credentials returned by an [AuthProvider](./auth-types.authprovider.md)<!-- -->. Implementations specify the details about each auth provider's credential requirements. |
13+
| [EmailAuthProvider](./auth-types.emailauthprovider.md) | Provider for generating [EmailAuthCredential](./auth.emailauthcredential.md)<!-- -->. |
1414
| [MultiFactorResolver](./auth-types.multifactorresolver.md) | The class used to facilitate recovery from [MultiFactorError](./auth-types.multifactorerror.md) when a user needs to provide a second factor to sign in. |
15-
| [OAuthCredential](./auth-types.oauthcredential.md) | Interface that represents the OAuth credentials returned by an OAuth provider. Implementations specify the details about each auth provider's credential requirements. |
16-
| [PhoneAuthCredential](./auth-types.phoneauthcredential.md) | Class that represents the Phone Auth credentials returned by a [PhoneAuthProvider](./auth-types.phoneauthprovider.md)<!-- -->. |
17-
| [PhoneAuthProvider](./auth-types.phoneauthprovider.md) | A provider for generating phone credentials. |
15+
| [OAuthCredential](./auth-types.oauthcredential.md) | Interface that represents the OAuth credentials returned by an [OAuthProvider](./auth.oauthprovider.md)<!-- -->. Implementations specify the details about each auth provider's credential requirements. |
16+
| [PhoneAuthCredential](./auth-types.phoneauthcredential.md) | Class that represents the Phone Auth credentials returned by a [PhoneAuthProvider](./auth.phoneauthprovider.md)<!-- -->. |
17+
| [PhoneAuthProvider](./auth-types.phoneauthprovider.md) | A provider for generating [PhoneAuthCredential](./auth.phoneauthcredential.md)<!-- -->. |
1818
| [PhoneMultiFactorGenerator](./auth-types.phonemultifactorgenerator.md) | The class used to initialize a [PhoneMultiFactorAssertion](./auth-types.phonemultifactorassertion.md)<!-- -->. |
1919
| [RecaptchaVerifier](./auth-types.recaptchaverifier.md) | An [reCAPTCHA](https://www.google.com/recaptcha/)<!-- -->-based application verifier. |
2020

@@ -34,14 +34,14 @@
3434
| [ActionCodeInfo](./auth-types.actioncodeinfo.md) | A response from <code>checkActionCode</code>. |
3535
| [ActionCodeSettings](./auth-types.actioncodesettings.md) | This is the interface that defines the required continue/state URL with optional Android and iOS bundle identifiers. |
3636
| [AdditionalUserInfo](./auth-types.additionaluserinfo.md) | A structure containing additional user information from a federated identity provider. |
37-
| [ApplicationVerifier](./auth-types.applicationverifier.md) | A verifier for domain verification and abuse prevention. Currently, the only implementation is [RecaptchaVerifier](./auth-types.recaptchaverifier.md)<!-- -->. |
37+
| [ApplicationVerifier](./auth-types.applicationverifier.md) | A verifier for domain verification and abuse prevention. Currently, the only implementation is [RecaptchaVerifier](./auth.recaptchaverifier.md)<!-- -->. |
3838
| [Auth](./auth-types.auth.md) | The Firebase Auth service interface.<!-- -->See [Firebase Authentication](https://firebase.google.com/docs/auth/) for a full guide on how to use the Firebase Auth service. |
3939
| [AuthError](./auth-types.autherror.md) | |
4040
| [AuthProvider](./auth-types.authprovider.md) | Interface that represents an auth provider, used to facilitate creating [AuthCredential](./auth-types.authcredential.md)<!-- -->. |
4141
| [AuthSettings](./auth-types.authsettings.md) | Interface representing an Auth instance's settings, currently used for enabling/disabling app verification for phone Auth testing. |
4242
| [Config](./auth-types.config.md) | Auth config object. |
4343
| [ConfirmationResult](./auth-types.confirmationresult.md) | A result from a phone number sign-in, link, or reauthenticate call. |
44-
| [IdTokenResult](./auth-types.idtokenresult.md) | Interface representing ID token result obtained from <code>getIdTokenResult</code>. It contains the ID token JWT string and other helper properties for getting different data associated with the token as well as all the decoded payload claims.<!-- -->Note that these claims are not to be trusted as they are parsed client side. Only server side verification can guarantee the integrity of the token claims. |
44+
| [IdTokenResult](./auth-types.idtokenresult.md) | Interface representing ID token result obtained from [User.getIdTokenResult()](./auth-types.user.getidtokenresult.md)<!-- -->. It contains the ID token JWT string and other helper properties for getting different data associated with the token as well as all the decoded payload claims.<!-- -->Note that these claims are not to be trusted as they are parsed client side. Only server side verification can guarantee the integrity of the token claims. |
4545
| [MultiFactorAssertion](./auth-types.multifactorassertion.md) | The base class for asserting ownership of a second factor. This is used to facilitate enrollment of a second factor on an existing user or sign-in of a user who already verified the first factor. |
4646
| [MultiFactorError](./auth-types.multifactorerror.md) | The error thrown when the user needs to provide a second factor to sign in successfully. The error code for this error is <code>auth/multi-factor-auth-required</code>. |
4747
| [MultiFactorInfo](./auth-types.multifactorinfo.md) | A structure containing the information of a second factor entity. |
@@ -53,7 +53,7 @@
5353
| [PhoneMultiFactorEnrollInfoOptions](./auth-types.phonemultifactorenrollinfooptions.md) | Options used for enrolling a second factor. |
5454
| [PhoneMultiFactorSignInInfoOptions](./auth-types.phonemultifactorsignininfooptions.md) | Options used for signing-in with a second factor. |
5555
| [PhoneSingleFactorInfoOptions](./auth-types.phonesinglefactorinfooptions.md) | Options used for single-factor sign-in. |
56-
| [PopupRedirectResolver](./auth-types.popupredirectresolver.md) | A resolver used for handling DOM specific operations like <code>signInWithPopup()</code> or <code>signInWithRedirect()</code>. |
56+
| [PopupRedirectResolver](./auth-types.popupredirectresolver.md) | A resolver used for handling DOM specific operations like [signInWithPopup()](./auth.signinwithpopup.md) or [signInWithRedirect()](./auth.signinwithredirect.md)<!-- -->. |
5757
| [ReactNativeAsyncStorage](./auth-types.reactnativeasyncstorage.md) | Interface for a supplied AsyncStorage. |
5858
| [User](./auth-types.user.md) | A user account. |
5959
| [UserCredential](./auth-types.usercredential.md) | A structure containing a [User](./auth-types.user.md)<!-- -->, an [AuthCredential](./auth-types.authcredential.md)<!-- -->, the [OperationType](./auth-types.operationtype.md)<!-- -->, and any additional user information that was returned from the identity provider. <code>operationType</code> could be [OperationType.SIGN\_IN](./auth-types.operationtype.sign_in.md) for a sign-in operation, [OperationType.LINK](./auth-types.operationtype.link.md) for a linking operation and [OperationType.REAUTHENTICATE](./auth-types.operationtype.reauthenticate.md) for a reauthentication operation. |

docs-exp/auth-types.oauthcredential.accesstoken.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## OAuthCredential.accessToken property
66

7-
The OAuth access token associated with the credential if it belongs to an OAuth provider, such as `facebook.com`<!-- -->, `twitter.com`<!-- -->, etc.
7+
The OAuth access token associated with the credential if it belongs to an [OAuthProvider](./auth.oauthprovider.md)<!-- -->, such as `facebook.com`<!-- -->, `twitter.com`<!-- -->, etc.
88

99
<b>Signature:</b>
1010

docs-exp/auth-types.oauthcredential.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## OAuthCredential class
66

7-
Interface that represents the OAuth credentials returned by an OAuth provider. Implementations specify the details about each auth provider's credential requirements.
7+
Interface that represents the OAuth credentials returned by an [OAuthProvider](./auth.oauthprovider.md)<!-- -->. Implementations specify the details about each auth provider's credential requirements.
88

99
<b>Signature:</b>
1010

@@ -17,7 +17,7 @@ export abstract class OAuthCredential extends AuthCredential
1717
1818
| Property | Modifiers | Type | Description |
1919
| --- | --- | --- | --- |
20-
| [accessToken](./auth-types.oauthcredential.accesstoken.md) | | string | The OAuth access token associated with the credential if it belongs to an OAuth provider, such as <code>facebook.com</code>, <code>twitter.com</code>, etc. |
20+
| [accessToken](./auth-types.oauthcredential.accesstoken.md) | | string | The OAuth access token associated with the credential if it belongs to an [OAuthProvider](./auth.oauthprovider.md)<!-- -->, such as <code>facebook.com</code>, <code>twitter.com</code>, etc. |
2121
| [idToken](./auth-types.oauthcredential.idtoken.md) | | string | The OAuth ID token associated with the credential if it belongs to an OIDC provider, such as <code>google.com</code>. |
2222
| [secret](./auth-types.oauthcredential.secret.md) | | string | The OAuth access token secret associated with the credential if it belongs to an OAuth 1.0 provider, such as <code>twitter.com</code>. |
2323

0 commit comments

Comments
 (0)