Skip to content

Commit 7b26c90

Browse files
committed
More docs + PR feedback
1 parent c4d10b5 commit 7b26c90

File tree

94 files changed

+623
-223
lines changed

Some content is hidden

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

94 files changed

+623
-223
lines changed

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

Lines changed: 5 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export interface ActionCodeSettings {
2828
minimumVersion?: string;
2929
packageName: string;
3030
};
31-
// (undocumented)
3231
dynamicLinkDomain?: string;
3332
handleCodeInApp?: boolean;
3433
iOS?: {
@@ -50,13 +49,9 @@ export abstract class ActionCodeURL {
5049

5150
// @public
5251
export interface AdditionalUserInfo {
53-
// (undocumented)
5452
readonly isNewUser: boolean;
55-
// (undocumented)
5653
readonly profile: UserProfile | null;
57-
// (undocumented)
5854
readonly providerId: ProviderId | null;
59-
// (undocumented)
6055
readonly username?: string | null;
6156
}
6257

@@ -99,24 +94,19 @@ export abstract class AuthCredential {
9994

10095
readonly signInMethod: string;
10196

102-
// (undocumented)
10397
toJSON(): object;
10498
}
10599

106100
// @public (undocumented)
107101
export interface AuthError extends FirebaseError {
108102
readonly appName: string;
109-
110103
readonly email?: string;
111-
112104
readonly phoneNumber?: string;
113-
114105
readonly tenantid?: string;
115106
}
116107

117108
// @public
118109
export interface AuthProvider {
119-
// (undocumented)
120110
readonly providerId: string;
121111
}
122112

@@ -127,17 +117,11 @@ export interface AuthSettings {
127117

128118
// @public
129119
export interface Config {
130-
// (undocumented)
131120
apiHost: string;
132-
// (undocumented)
133121
apiKey: string;
134-
// (undocumented)
135122
apiScheme: string;
136-
// (undocumented)
137123
authDomain?: string;
138-
// (undocumented)
139124
sdkClientVersion: string;
140-
// (undocumented)
141125
tokenApiHost: string;
142126
}
143127

@@ -149,20 +133,15 @@ export interface ConfirmationResult {
149133

150134
// @public
151135
export abstract class EmailAuthProvider implements AuthProvider {
152-
// (undocumented)
153136
static credential(email: string, password: string): AuthCredential;
154137
static credentialWithLink(
155138
auth: Auth,
156139
email: string,
157140
emailLink: string
158141
): AuthCredential;
159-
// (undocumented)
160142
static readonly EMAIL_LINK_SIGN_IN_METHOD: SignInMethod;
161-
// (undocumented)
162143
static readonly EMAIL_PASSWORD_SIGN_IN_METHOD: SignInMethod;
163-
// (undocumented)
164144
static readonly PROVIDER_ID: ProviderId;
165-
// (undocumented)
166145
readonly providerId: ProviderId;
167146
}
168147

@@ -184,9 +163,7 @@ export interface MultiFactorAssertion {
184163

185164
// @public
186165
export interface MultiFactorError extends AuthError {
187-
// (undocumented)
188166
readonly credential: AuthCredential;
189-
// (undocumented)
190167
readonly operationType: OperationType;
191168
}
192169

@@ -219,7 +196,7 @@ export interface MultiFactorUser {
219196
unenroll(option: MultiFactorInfo | string): Promise<void>;
220197
}
221198

222-
// @public (undocumented)
199+
// @public
223200
export type NextOrObserver<T> = NextFn<T | null> | Observer<T | null>;
224201

225202
// @public
@@ -245,36 +222,26 @@ export const enum Operation {
245222

246223
// @public
247224
export const enum OperationType {
248-
// (undocumented)
249225
LINK = 'link',
250-
// (undocumented)
251226
REAUTHENTICATE = 'reauthenticate',
252-
// (undocumented)
253227
SIGN_IN = 'signIn'
254228
}
255229

256230
// @public
257231
export interface ParsedToken {
258-
// (undocumented)
259232
[key: string]: string | object | undefined;
260-
// (undocumented)
261233
'auth_time'?: string;
262-
// (undocumented)
263234
'exp'?: string;
264-
// (undocumented)
265235
'firebase'?: {
266236
'sign_in_provider'?: string;
267237
'sign_in_second_factor'?: string;
268238
};
269-
// (undocumented)
270239
'iat'?: string;
271-
// (undocumented)
272240
'sub'?: string;
273241
}
274242

275243
// @public
276244
export interface Persistence {
277-
// (undocumented)
278245
readonly type: 'SESSION' | 'LOCAL' | 'NONE';
279246
}
280247

@@ -290,11 +257,8 @@ export class PhoneAuthProvider implements AuthProvider {
290257
verificationId: string,
291258
verificationCode: string
292259
): AuthCredential;
293-
// (undocumented)
294260
static readonly PHONE_SIGN_IN_METHOD: SignInMethod;
295-
// (undocumented)
296261
static readonly PROVIDER_ID: ProviderId;
297-
// (undocumented)
298262
readonly providerId: ProviderId;
299263
verifyPhoneNumber(
300264
phoneInfoOptions: PhoneInfoOptions | string,
@@ -311,11 +275,9 @@ export type PhoneInfoOptions =
311275
// @public
312276
export interface PhoneMultiFactorAssertion extends MultiFactorAssertion {}
313277

314-
// @public (undocumented)
278+
// @public
315279
export interface PhoneMultiFactorEnrollInfoOptions {
316-
// (undocumented)
317280
phoneNumber: string;
318-
// (undocumented)
319281
session: MultiFactorSession;
320282
}
321283

@@ -327,19 +289,15 @@ export abstract class PhoneMultiFactorGenerator {
327289
static FACTOR_ID: ProviderId;
328290
}
329291

330-
// @public (undocumented)
292+
// @public
331293
export interface PhoneMultiFactorSignInInfoOptions {
332-
// (undocumented)
333294
multiFactorHint?: MultiFactorInfo;
334-
// (undocumented)
335295
multiFactorUid?: string;
336-
// (undocumented)
337296
session: MultiFactorSession;
338297
}
339298

340-
// @public (undocumented)
299+
// @public
341300
export interface PhoneSingleFactorInfoOptions {
342-
// (undocumented)
343301
phoneNumber: string;
344302
}
345303

@@ -368,13 +326,10 @@ export const enum ProviderId {
368326
TWITTER = 'twitter.com'
369327
}
370328

371-
// @public (undocumented)
329+
// @public
372330
export interface ReactNativeAsyncStorage {
373-
// (undocumented)
374331
getItem(key: string): Promise<string | null>;
375-
// (undocumented)
376332
removeItem(key: string): Promise<void>;
377-
// (undocumented)
378333
setItem(key: string, value: string): Promise<void>;
379334
}
380335

@@ -414,18 +369,12 @@ export const enum SignInMethod {
414369
// @public
415370
export interface User extends UserInfo {
416371
delete(): Promise<void>;
417-
// (undocumented)
418372
readonly emailVerified: boolean;
419373
getIdToken(forceRefresh?: boolean): Promise<string>;
420-
// (undocumented)
421374
getIdTokenResult(forceRefresh?: boolean): Promise<IdTokenResult>;
422-
// (undocumented)
423375
readonly isAnonymous: boolean;
424-
// (undocumented)
425376
readonly metadata: UserMetadata;
426-
// (undocumented)
427377
readonly providerData: UserInfo[];
428-
// (undocumented)
429378
readonly refreshToken: string;
430379
reload(): Promise<void>;
431380
readonly tenantId: string | null;
@@ -434,33 +383,24 @@ export interface User extends UserInfo {
434383

435384
// @public
436385
export interface UserCredential {
437-
// (undocumented)
438386
operationType: OperationType;
439-
// (undocumented)
440387
providerId: ProviderId | null;
441-
// (undocumented)
442388
user: User;
443389
}
444390

445391
// @public
446392
export interface UserInfo {
447-
// (undocumented)
448393
readonly displayName: string | null;
449-
// (undocumented)
450394
readonly email: string | null;
451395
readonly phoneNumber: string | null;
452-
// (undocumented)
453396
readonly photoURL: string | null;
454-
// (undocumented)
455397
readonly providerId: string;
456398
readonly uid: string;
457399
}
458400

459401
// @public
460402
export interface UserMetadata {
461-
// (undocumented)
462403
readonly creationTime?: string;
463-
// (undocumented)
464404
readonly lastSignInTime?: string;
465405
}
466406

docs-exp/auth-types.actioncodesettings.dynamiclinkdomain.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## ActionCodeSettings.dynamicLinkDomain property
66

7+
When multiple custom dynamic link domains are defined for a project, specify which one to use when the link is to be opened via a specified mobile app (for example, `example.page.link`<!-- -->). Otherwise the first domain is automatically selected.
8+
79
<b>Signature:</b>
810

911
```typescript

docs-exp/auth-types.actioncodesettings.ios.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
Sets the iOS bundle ID. This will try to open the link in an iOS app if it is installed.
88

9+
App installation is not supported for iOS.
10+
911
<b>Signature:</b>
1012

1113
```typescript

docs-exp/auth-types.actioncodesettings.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export interface ActionCodeSettings
1717
| Property | Type | Description |
1818
| --- | --- | --- |
1919
| [android](./auth-types.actioncodesettings.android.md) | { installApp?: boolean; minimumVersion?: string; packageName: string; } | Sets the Android package name. This will try to open the link in an android app if it is installed. If <code>installApp</code> is passed, it specifies whether to install the Android app if the device supports it and the app is not already installed. If this field is provided without a <code>packageName</code>, an error is thrown explaining that the <code>packageName</code> must be provided in conjunction with this field. If <code>minimumVersion</code> is specified, and an older version of the app is installed, the user is taken to the Play Store to upgrade the app. |
20-
| [dynamicLinkDomain](./auth-types.actioncodesettings.dynamiclinkdomain.md) | string | |
20+
| [dynamicLinkDomain](./auth-types.actioncodesettings.dynamiclinkdomain.md) | string | When multiple custom dynamic link domains are defined for a project, specify which one to use when the link is to be opened via a specified mobile app (for example, <code>example.page.link</code>). Otherwise the first domain is automatically selected. |
2121
| [handleCodeInApp](./auth-types.actioncodesettings.handlecodeinapp.md) | boolean | The default is false. When set to true, the action code link will be be sent as a Universal Link or Android App Link and will be opened by the app if installed. In the false case, the code will be sent to the web widget first and then on continue will redirect to the app if installed. |
22-
| [iOS](./auth-types.actioncodesettings.ios.md) | { bundleId: string; } | Sets the iOS bundle ID. This will try to open the link in an iOS app if it is installed. |
23-
| [url](./auth-types.actioncodesettings.url.md) | string | Sets the link continue/state URL, which has different meanings in different contexts: - When the link is handled in the web action widgets, this is the deep link in the <code>continueUrl</code> query parameter. - When the link is handled in the app directly, this is the continueUrl query parameter in the deep link of the Dynamic Link. |
22+
| [iOS](./auth-types.actioncodesettings.ios.md) | { bundleId: string; } | Sets the iOS bundle ID. This will try to open the link in an iOS app if it is installed.<!-- -->App installation is not supported for iOS. |
23+
| [url](./auth-types.actioncodesettings.url.md) | string | Sets the link continue/state URL, which has different meanings in different contexts: - When the link is handled in the web action widgets, this is the deep link in the <code>continueUrl</code> query parameter. - When the link is handled in the app directly, this is the <code>continueUrl</code> query parameter in the deep link of the Dynamic Link. |
2424

docs-exp/auth-types.actioncodesettings.url.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## ActionCodeSettings.url property
66

7-
Sets the link continue/state URL, which has different meanings in different contexts: - When the link is handled in the web action widgets, this is the deep link in the `continueUrl` query parameter. - When the link is handled in the app directly, this is the continueUrl query parameter in the deep link of the Dynamic Link.
7+
Sets the link continue/state URL, which has different meanings in different contexts: - When the link is handled in the web action widgets, this is the deep link in the `continueUrl` query parameter. - When the link is handled in the app directly, this is the `continueUrl` query parameter in the deep link of the Dynamic Link.
88

99
<b>Signature:</b>
1010

docs-exp/auth-types.additionaluserinfo.isnewuser.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## AdditionalUserInfo.isNewUser property
66

7+
Whether the user is new (created via sign-up) or existing (authenticated using sign-in).
8+
79
<b>Signature:</b>
810

911
```typescript

docs-exp/auth-types.additionaluserinfo.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export interface AdditionalUserInfo
1616

1717
| Property | Type | Description |
1818
| --- | --- | --- |
19-
| [isNewUser](./auth-types.additionaluserinfo.isnewuser.md) | boolean | |
20-
| [profile](./auth-types.additionaluserinfo.profile.md) | [UserProfile](./auth-types.userprofile.md) \| null | |
21-
| [providerId](./auth-types.additionaluserinfo.providerid.md) | [ProviderId](./auth-types.providerid.md) \| null | |
22-
| [username](./auth-types.additionaluserinfo.username.md) | string \| null | |
19+
| [isNewUser](./auth-types.additionaluserinfo.isnewuser.md) | boolean | Whether the user is new (created via sign-up) or existing (authenticated using sign-in). |
20+
| [profile](./auth-types.additionaluserinfo.profile.md) | [UserProfile](./auth-types.userprofile.md) \| null | Map containing IDP-specific user data. |
21+
| [providerId](./auth-types.additionaluserinfo.providerid.md) | [ProviderId](./auth-types.providerid.md) \| null | Identifier for the provider used to authenticate this user. |
22+
| [username](./auth-types.additionaluserinfo.username.md) | string \| null | The username if the provider is GitHub or Twitter. |
2323

docs-exp/auth-types.additionaluserinfo.profile.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## AdditionalUserInfo.profile property
66

7+
Map containing IDP-specific user data.
8+
79
<b>Signature:</b>
810

911
```typescript

docs-exp/auth-types.additionaluserinfo.providerid.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## AdditionalUserInfo.providerId property
66

7+
Identifier for the provider used to authenticate this user.
8+
79
<b>Signature:</b>
810

911
```typescript

docs-exp/auth-types.additionaluserinfo.username.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## AdditionalUserInfo.username property
66

7+
The username if the provider is GitHub or Twitter.
8+
79
<b>Signature:</b>
810

911
```typescript

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void
2727
## Example
2828

2929

30-
```
30+
```javascript
3131
auth.setPersistence(browserSessionPersistence);
3232

3333
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tenantId: string | null;
1515
## Example
1616

1717

18-
```
18+
```javascript
1919
// Set the tenant ID on Auth instance.
2020
auth.tenantId = 'TENANT_PROJECT_ID';
2121

docs-exp/auth-types.authcredential.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ export abstract class AuthCredential
2424
| Method | Modifiers | Description |
2525
| --- | --- | --- |
2626
| [fromJSON(json)](./auth-types.authcredential.fromjson.md) | <code>static</code> | Static method to deserialize a JSON representation of an object into an [AuthCredential](./auth-types.authcredential.md)<!-- -->. |
27-
| [toJSON()](./auth-types.authcredential.tojson.md) | | |
27+
| [toJSON()](./auth-types.authcredential.tojson.md) | | Returns a JSON-serializable representation of this object. |
2828

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## AuthCredential.toJSON() method
66

7+
Returns a JSON-serializable representation of this object.
8+
79
<b>Signature:</b>
810

911
```typescript

docs-exp/auth-types.authprovider.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## AuthProvider interface
66

7-
Interface that represents an auth provider.
7+
Interface that represents an auth provider, used to facilitate creating [AuthCredential](./auth-types.authcredential.md)<!-- -->.
88

99
<b>Signature:</b>
1010

@@ -16,5 +16,5 @@ export interface AuthProvider
1616

1717
| Property | Type | Description |
1818
| --- | --- | --- |
19-
| [providerId](./auth-types.authprovider.providerid.md) | string | |
19+
| [providerId](./auth-types.authprovider.providerid.md) | string | Provider for which credentials can be constructed. |
2020

0 commit comments

Comments
 (0)