Skip to content

Commit f788f51

Browse files
authored
Merge b17c958 into 344bd88
2 parents 344bd88 + b17c958 commit f788f51

File tree

102 files changed

+945
-505
lines changed

Some content is hidden

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

102 files changed

+945
-505
lines changed

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

+26-46
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,18 @@ export function applyActionCode(auth: externs.Auth, oobCode: string): Promise<vo
4040

4141
// @public (undocumented)
4242
export class AuthCredential {
43+
// @internal
4344
protected constructor(providerId: string, signInMethod: string);
4445
// Warning: (ae-forgotten-export) The symbol "Auth" needs to be exported by the entry point index.d.ts
4546
// Warning: (ae-forgotten-export) The symbol "PhoneOrOauthTokenResponse" needs to be exported by the entry point index.d.ts
4647
//
47-
// (undocumented)
48+
// @internal (undocumented)
4849
_getIdTokenResponse(_auth: Auth_2): Promise<PhoneOrOauthTokenResponse>;
49-
// (undocumented)
50+
// @internal (undocumented)
5051
_getReauthenticationResolver(_auth: Auth_2): Promise<IdTokenResponse>;
5152
// Warning: (ae-forgotten-export) The symbol "IdTokenResponse" needs to be exported by the entry point index.d.ts
5253
//
53-
// (undocumented)
54+
// @internal (undocumented)
5455
_linkToIdToken(_auth: Auth_2, _idToken: string): Promise<IdTokenResponse>;
5556
// (undocumented)
5657
readonly providerId: string;
@@ -78,24 +79,27 @@ export function confirmPasswordReset(auth: externs.Auth, oobCode: string, newPas
7879
// @public (undocumented)
7980
export function createUserWithEmailAndPassword(auth: externs.Auth, email: string, password: string): Promise<externs.UserCredential>;
8081

82+
// @public
83+
export type CustomParameters = Record<string, string>;
84+
8185
// @public (undocumented)
8286
export function deleteUser(user: externs.User): Promise<void>;
8387

84-
// @public (undocumented)
88+
// @public
8589
export class EmailAuthCredential extends AuthCredential implements externs.AuthCredential {
8690
// (undocumented)
8791
readonly email: string;
88-
// (undocumented)
92+
// @internal (undocumented)
8993
static _fromEmailAndCode(email: string, oobCode: string, tenantId?: string | null): EmailAuthCredential;
90-
// (undocumented)
94+
// @internal (undocumented)
9195
static _fromEmailAndPassword(email: string, password: string): EmailAuthCredential;
9296
// (undocumented)
9397
static fromJSON(json: object | string): EmailAuthCredential | null;
94-
// (undocumented)
98+
// @internal (undocumented)
9599
_getIdTokenResponse(auth: Auth_2): Promise<IdTokenResponse>;
96-
// (undocumented)
100+
// @internal (undocumented)
97101
_getReauthenticationResolver(auth: Auth_2): Promise<IdTokenResponse>;
98-
// (undocumented)
102+
// @internal (undocumented)
99103
_linkToIdToken(auth: Auth_2, idToken: string): Promise<IdTokenResponse>;
100104
// (undocumented)
101105
readonly password: string;
@@ -121,19 +125,15 @@ export class EmailAuthProvider implements externs.EmailAuthProvider {
121125
readonly providerId = externs.ProviderId.PASSWORD;
122126
}
123127

124-
// @public (undocumented)
128+
// @public
125129
export class FacebookAuthProvider extends OAuthProvider {
126-
// (undocumented)
127130
static credential(accessToken: string): externs.OAuthCredential;
128131
// (undocumented)
129132
static credentialFromError(error: FirebaseError): externs.OAuthCredential | null;
130133
// (undocumented)
131134
static credentialFromResult(userCredential: externs.UserCredential): externs.OAuthCredential | null;
132-
// (undocumented)
133135
static readonly FACEBOOK_SIGN_IN_METHOD = externs.SignInMethod.FACEBOOK;
134-
// (undocumented)
135136
static readonly PROVIDER_ID = externs.ProviderId.FACEBOOK;
136-
// (undocumented)
137137
readonly providerId = externs.ProviderId.FACEBOOK;
138138
}
139139

@@ -158,35 +158,27 @@ export function getMultiFactorResolver(auth: externs.Auth, errorExtern: externs.
158158
// @public (undocumented)
159159
export function getRedirectResult(authExtern: externs.Auth, resolverExtern?: externs.PopupRedirectResolver): Promise<externs.UserCredential | null>;
160160

161-
// @public (undocumented)
161+
// @public
162162
export class GithubAuthProvider extends OAuthProvider {
163-
// (undocumented)
164163
static credential(accessToken: string): externs.OAuthCredential;
165164
// (undocumented)
166165
static credentialFromError(error: FirebaseError): externs.OAuthCredential | null;
167166
// (undocumented)
168167
static credentialFromResult(userCredential: externs.UserCredential): externs.OAuthCredential | null;
169-
// (undocumented)
170168
static readonly GITHUB_SIGN_IN_METHOD = externs.SignInMethod.GITHUB;
171-
// (undocumented)
172169
static readonly PROVIDER_ID = externs.ProviderId.GITHUB;
173-
// (undocumented)
174170
readonly providerId = externs.ProviderId.GITHUB;
175171
}
176172

177-
// @public (undocumented)
173+
// @public
178174
export class GoogleAuthProvider extends OAuthProvider {
179-
// (undocumented)
180175
static credential(idToken?: string | null, accessToken?: string | null): externs.OAuthCredential;
181176
// (undocumented)
182177
static credentialFromError(error: FirebaseError): externs.OAuthCredential | null;
183178
// (undocumented)
184179
static credentialFromResult(userCredential: externs.UserCredential): externs.OAuthCredential | null;
185-
// (undocumented)
186180
static readonly GOOGLE_SIGN_IN_METHOD = externs.SignInMethod.GOOGLE;
187-
// (undocumented)
188181
static readonly PROVIDER_ID = externs.ProviderId.GOOGLE;
189-
// (undocumented)
190182
readonly providerId = externs.ProviderId.GOOGLE;
191183
}
192184

@@ -221,54 +213,43 @@ export function multiFactor(user: externs.User): externs.MultiFactorUser;
221213

222214
// @public (undocumented)
223215
export class OAuthCredential extends AuthCredential implements externs.OAuthCredential {
224-
// (undocumented)
225216
accessToken?: string;
226217
// (undocumented)
227218
static fromJSON(json: string | object): OAuthCredential | null;
228219
// Warning: (ae-forgotten-export) The symbol "OAuthCredentialParams" needs to be exported by the entry point index.d.ts
229220
//
230-
// (undocumented)
221+
// @internal (undocumented)
231222
static _fromParams(params: OAuthCredentialParams): OAuthCredential;
232-
// (undocumented)
223+
// @internal (undocumented)
233224
_getIdTokenResponse(auth: Auth_2): Promise<IdTokenResponse>;
234-
// (undocumented)
225+
// @internal (undocumented)
235226
_getReauthenticationResolver(auth: Auth_2): Promise<IdTokenResponse>;
236227
// (undocumented)
237228
idToken?: string;
238-
// (undocumented)
229+
// @internal (undocumented)
239230
_linkToIdToken(auth: Auth_2, idToken: string): Promise<IdTokenResponse>;
240-
// (undocumented)
231+
// @internal (undocumented)
241232
nonce?: string;
242-
// (undocumented)
243233
secret?: string;
244234
// (undocumented)
245235
toJSON(): object;
246236
}
247237

248-
// @public (undocumented)
238+
// @public
249239
export class OAuthProvider implements externs.AuthProvider {
250240
constructor(providerId: string);
251-
// (undocumented)
252241
addScope(scope: string): externs.AuthProvider;
253-
// Warning: (ae-forgotten-export) The symbol "CredentialParameters" needs to be exported by the entry point index.d.ts
254-
//
255-
// (undocumented)
256-
credential(params: CredentialParameters): externs.OAuthCredential;
242+
// Warning: (ae-forgotten-export) The symbol "OAuthCredentialOptions" needs to be exported by the entry point index.d.ts
243+
credential(params: OAuthCredentialOptions): externs.OAuthCredential;
257244
// (undocumented)
258245
static credentialFromJSON(json: object | string): externs.OAuthCredential;
259-
// (undocumented)
246+
// @internal (undocumented)
260247
defaultLanguageCode: string | null;
261-
// (undocumented)
262248
getCustomParameters(): CustomParameters;
263-
// (undocumented)
264249
getScopes(): string[];
265250
// (undocumented)
266251
readonly providerId: string;
267-
// Warning: (ae-forgotten-export) The symbol "CustomParameters" needs to be exported by the entry point index.d.ts
268-
//
269-
// (undocumented)
270252
setCustomParameters(customOAuthParameters: CustomParameters): externs.AuthProvider;
271-
// (undocumented)
272253
setDefaultLanguage(languageCode: string | null): void;
273254
}
274255

@@ -402,9 +383,8 @@ export function signInWithRedirect(authExtern: externs.Auth, provider: externs.A
402383
// @public (undocumented)
403384
export function signOut(auth: externs.Auth): Promise<void>;
404385

405-
// @public (undocumented)
386+
// @public
406387
export class TwitterAuthProvider extends OAuthProvider {
407-
// (undocumented)
408388
static credential(token: string, secret: string): externs.OAuthCredential;
409389
// (undocumented)
410390
static credentialFromError(error: FirebaseError): externs.OAuthCredential | null;

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.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

0 commit comments

Comments
 (0)