cloudfire-auth 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -16
- package/dist/CloudFireAuth.d.ts +304 -1
- package/dist/CloudFireAuth.js +345 -0
- package/dist/rest-api/create-custom-token.d.ts +18 -0
- package/dist/rest-api/create-custom-token.js +20 -0
- package/dist/rest-api/create-provider-config.d.ts +16 -0
- package/dist/rest-api/create-provider-config.js +17 -0
- package/dist/rest-api/create-session-cookie.d.ts +18 -0
- package/dist/rest-api/create-session-cookie.js +19 -0
- package/dist/rest-api/delete-provider-config.d.ts +16 -0
- package/dist/rest-api/delete-provider-config.js +18 -0
- package/dist/rest-api/generate-email-verification-link.d.ts +18 -0
- package/dist/rest-api/generate-email-verification-link.js +19 -0
- package/dist/rest-api/generate-password-reset-link.d.ts +18 -0
- package/dist/rest-api/generate-password-reset-link.js +19 -0
- package/dist/rest-api/generate-sign-in-with-email-link.d.ts +18 -0
- package/dist/rest-api/generate-sign-in-with-email-link.js +19 -0
- package/dist/rest-api/generate-verify-and-change-email-link.d.ts +20 -0
- package/dist/rest-api/generate-verify-and-change-email-link.js +21 -0
- package/dist/rest-api/get-provider-config.d.ts +17 -0
- package/dist/rest-api/get-provider-config.js +18 -0
- package/dist/rest-api/import-users.d.ts +18 -0
- package/dist/rest-api/import-users.js +19 -0
- package/dist/rest-api/list-provider-configs.d.ts +17 -0
- package/dist/rest-api/list-provider-configs.js +18 -0
- package/dist/rest-api/update-provider-config.d.ts +18 -0
- package/dist/rest-api/update-provider-config.js +19 -0
- package/dist/types/firebase-admin/action-code-settings.d.ts +102 -0
- package/dist/types/firebase-admin/action-code-settings.js +17 -0
- package/dist/types/firebase-admin/auth-config.d.ts +39 -33
- package/dist/types/firebase-admin/auth-config.js +16 -0
- package/dist/types/firebase-admin/identifier.d.ts +6 -0
- package/dist/types/firebase-admin/identifier.js +16 -0
- package/dist/types/firebase-admin/index.d.ts +11 -2
- package/dist/types/firebase-admin/index.js +16 -0
- package/dist/types/firebase-admin/token-verifier.d.ts +6 -0
- package/dist/types/firebase-admin/token-verifier.js +16 -0
- package/dist/types/firebase-admin/user-import.d.ts +226 -0
- package/dist/types/firebase-admin/user-import.js +17 -0
- package/dist/types/firebase-admin/user-record.d.ts +6 -0
- package/dist/types/firebase-admin/user-record.js +17 -0
- package/dist/types.d.ts +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -62,22 +62,34 @@ new CloudFireAuth(serviceAccountKey: ServiceAccountKey, kvNamespace?: KVNamespac
|
|
|
62
62
|
|
|
63
63
|
### Methods
|
|
64
64
|
|
|
65
|
-
| Category
|
|
66
|
-
|
|
|
67
|
-
| **Authentication**
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
65
|
+
| Category | Method | Status | Description |
|
|
66
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------------------ | ------ | --------------------------------------- |
|
|
67
|
+
| **Authentication** | `verifyIdToken(idToken: string, checkRevoked?: boolean)` | ✅ | Verify Firebase ID tokens |
|
|
68
|
+
| | `verifySessionCookie(sessionCookie: string, checkRevoked?: boolean)` | ✅ | Verify session cookies |
|
|
69
|
+
| | `createSessionCookie(idToken: string, sessionCookieOptions: SessionCookieOptions)` | ❌ | Create session cookie from ID token |
|
|
70
|
+
| | `createCustomToken(uid: string, developerClaims?: object)` | ❌ | Create custom token for client SDK |
|
|
71
|
+
| **User Management** | `getUser(uid: string)` | ✅ | Get user by UID |
|
|
72
|
+
| | `getUserByEmail(email: string)` | ❌ | Get user by email |
|
|
73
|
+
| | `getUserByPhoneNumber(phoneNumber: string)` | ❌ | Get user by phone number |
|
|
74
|
+
| | `getUserByProviderUid(providerId: string, uid: string)` | ❌ | Get user by provider UID |
|
|
75
|
+
| | `getUsers(identifiers: UserIdentifier[])` | ❌ | Get users by identifiers |
|
|
76
|
+
| | `createUser(properties: CreateRequest)` | ❌ | Create a new user |
|
|
77
|
+
| | `updateUser(uid: string, properties: UpdateRequest)` | ✅ | Update existing user |
|
|
78
|
+
| | `deleteUser(uid: string)` | ✅ | Delete a user |
|
|
79
|
+
| | `deleteUsers(uids: string[])` | ❌ | Delete multiple users |
|
|
80
|
+
| | `listUsers(maxResults?: number, pageToken?: string)` | ❌ | List users with pagination |
|
|
81
|
+
| | `importUsers(users: UserImportRecord[], options?: UserImportOptions)` | ❌ | Bulk import users with password hashes |
|
|
82
|
+
| **Token Management** | `revokeRefreshTokens(uid: string)` | ✅ | Revoke all refresh tokens for a user |
|
|
83
|
+
| | `setCustomUserClaims(uid: string, customUserClaims: object \| null)` | ✅ | Set custom claims |
|
|
84
|
+
| **Email Actions** | `generatePasswordResetLink(email: string, actionCodeSettings?: ActionCodeSettings)` | ❌ | Generate password reset link |
|
|
85
|
+
| | `generateEmailVerificationLink(email: string, actionCodeSettings?: ActionCodeSettings)` | ❌ | Generate email verification link |
|
|
86
|
+
| | `generateVerifyAndChangeEmailLink(email: string, newEmail: string, actionCodeSettings?: ActionCodeSettings)` | ❌ | Generate email change verification link |
|
|
87
|
+
| | `generateSignInWithEmailLink(email: string, actionCodeSettings: ActionCodeSettings)` | ❌ | Generate sign-in with email link |
|
|
88
|
+
| **Provider Configuration** | `listProviderConfigs(options: AuthProviderConfigFilter)` | ❌ | List SAML/OIDC provider configurations |
|
|
89
|
+
| | `getProviderConfig(providerId: string)` | ❌ | Get provider configuration by ID |
|
|
90
|
+
| | `createProviderConfig(config: AuthProviderConfig)` | ❌ | Create new provider configuration |
|
|
91
|
+
| | `updateProviderConfig(providerId: string, updatedConfig: UpdateAuthProviderRequest)` | ❌ | Update provider configuration |
|
|
92
|
+
| | `deleteProviderConfig(providerId: string)` | ❌ | Delete provider configuration |
|
|
81
93
|
|
|
82
94
|
## Environment Setup
|
|
83
95
|
|
package/dist/CloudFireAuth.d.ts
CHANGED
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
/**
|
|
18
|
+
* You can find the code taken from the Firebase Admin SDK in this location of
|
|
19
|
+
* the firebase-admin 13.4.0 npm package:
|
|
20
|
+
*
|
|
21
|
+
* firebase-admin/lib/auth/base-auth.d.ts
|
|
22
|
+
*/
|
|
17
23
|
/**
|
|
18
24
|
* Alterations to Firebase Admin SDK Code
|
|
19
25
|
*
|
|
@@ -27,13 +33,30 @@
|
|
|
27
33
|
* - getOauth2AccessToken
|
|
28
34
|
*
|
|
29
35
|
*/
|
|
30
|
-
import type { DecodedIdToken, UserRecord, UserIdentifier, GetUsersResult, ListUsersResult, CreateRequest, UpdateRequest, DeleteUsersResult, ServiceAccountKey } from "./types.js";
|
|
36
|
+
import type { DecodedIdToken, UserRecord, UserIdentifier, GetUsersResult, ListUsersResult, CreateRequest, UpdateRequest, DeleteUsersResult, ServiceAccountKey, SessionCookieOptions, ActionCodeSettings, AuthProviderConfig, UpdateAuthProviderRequest, AuthProviderConfigFilter, ListProviderConfigResults, UserImportRecord, UserImportOptions, UserImportResult } from "./types.js";
|
|
31
37
|
export declare class CloudFireAuth {
|
|
32
38
|
private projectId;
|
|
33
39
|
private serviceAccountKey;
|
|
34
40
|
private oauth2Token?;
|
|
35
41
|
private kvNamespace?;
|
|
36
42
|
constructor(serviceAccountKey: ServiceAccountKey, kvNamespace?: KVNamespace);
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new Firebase custom token (JWT) that can be sent back to a client
|
|
45
|
+
* device to use to sign in with the client SDKs' `signInWithCustomToken()`
|
|
46
|
+
* methods. (Tenant-aware instances will also embed the tenant ID in the
|
|
47
|
+
* token.)
|
|
48
|
+
*
|
|
49
|
+
* See {@link https://firebase.google.com/docs/auth/admin/create-custom-tokens | Create Custom Tokens}
|
|
50
|
+
* for code samples and detailed documentation.
|
|
51
|
+
*
|
|
52
|
+
* @param uid - The `uid` to use as the custom token's subject.
|
|
53
|
+
* @param developerClaims - Optional additional claims to include
|
|
54
|
+
* in the custom token's payload.
|
|
55
|
+
*
|
|
56
|
+
* @returns A promise fulfilled with a custom token for the
|
|
57
|
+
* provided `uid` and payload.
|
|
58
|
+
*/
|
|
59
|
+
createCustomToken(uid: string, developerClaims?: object): Promise<string>;
|
|
37
60
|
/**
|
|
38
61
|
* Verifies a Firebase ID token (JWT). If the token is valid, the promise is
|
|
39
62
|
* fulfilled with the token's decoded claims; otherwise, the promise is
|
|
@@ -250,6 +273,42 @@ export declare class CloudFireAuth {
|
|
|
250
273
|
* tokens have been revoked.
|
|
251
274
|
*/
|
|
252
275
|
revokeRefreshTokens(uid: string): Promise<void>;
|
|
276
|
+
/**
|
|
277
|
+
* Imports the provided list of users into Firebase Auth.
|
|
278
|
+
* A maximum of 1000 users are allowed to be imported one at a time.
|
|
279
|
+
* When importing users with passwords,
|
|
280
|
+
* {@link UserImportOptions} are required to be
|
|
281
|
+
* specified.
|
|
282
|
+
* This operation is optimized for bulk imports and will ignore checks on `uid`,
|
|
283
|
+
* `email` and other identifier uniqueness which could result in duplications.
|
|
284
|
+
*
|
|
285
|
+
* @param users - The list of user records to import to Firebase Auth.
|
|
286
|
+
* @param options - The user import options, required when the users provided include
|
|
287
|
+
* password credentials.
|
|
288
|
+
* @returns A promise that resolves when
|
|
289
|
+
* the operation completes with the result of the import. This includes the
|
|
290
|
+
* number of successful imports, the number of failed imports and their
|
|
291
|
+
* corresponding errors.
|
|
292
|
+
*/
|
|
293
|
+
importUsers(users: UserImportRecord[], options?: UserImportOptions): Promise<UserImportResult>;
|
|
294
|
+
/**
|
|
295
|
+
* Creates a new Firebase session cookie with the specified options. The created
|
|
296
|
+
* JWT string can be set as a server-side session cookie with a custom cookie
|
|
297
|
+
* policy, and be used for session management. The session cookie JWT will have
|
|
298
|
+
* the same payload claims as the provided ID token.
|
|
299
|
+
*
|
|
300
|
+
* See {@link https://firebase.google.com/docs/auth/admin/manage-cookies | Manage Session Cookies}
|
|
301
|
+
* for code samples and detailed documentation.
|
|
302
|
+
*
|
|
303
|
+
* @param idToken - The Firebase ID token to exchange for a session
|
|
304
|
+
* cookie.
|
|
305
|
+
* @param sessionCookieOptions - The session
|
|
306
|
+
* cookie options which includes custom session duration.
|
|
307
|
+
*
|
|
308
|
+
* @returns A promise that resolves on success with the
|
|
309
|
+
* created session cookie.
|
|
310
|
+
*/
|
|
311
|
+
createSessionCookie(idToken: string, sessionCookieOptions: SessionCookieOptions): Promise<string>;
|
|
253
312
|
/**
|
|
254
313
|
* Verifies a Firebase session cookie. Returns a Promise with the cookie claims.
|
|
255
314
|
* Rejects the promise if the cookie could not be verified.
|
|
@@ -276,6 +335,250 @@ export declare class CloudFireAuth {
|
|
|
276
335
|
* a rejected promise.
|
|
277
336
|
*/
|
|
278
337
|
verifySessionCookie(sessionCookie: string, checkRevoked?: boolean): Promise<DecodedIdToken>;
|
|
338
|
+
/**
|
|
339
|
+
* Generates the out of band email action link to reset a user's password.
|
|
340
|
+
* The link is generated for the user with the specified email address. The
|
|
341
|
+
* optional {@link ActionCodeSettings} object
|
|
342
|
+
* defines whether the link is to be handled by a mobile app or browser and the
|
|
343
|
+
* additional state information to be passed in the deep link, etc.
|
|
344
|
+
*
|
|
345
|
+
* @example
|
|
346
|
+
* ```javascript
|
|
347
|
+
* var actionCodeSettings = {
|
|
348
|
+
* url: 'https://www.example.com/?email=user@example.com',
|
|
349
|
+
* iOS: {
|
|
350
|
+
* bundleId: 'com.example.ios'
|
|
351
|
+
* },
|
|
352
|
+
* android: {
|
|
353
|
+
* packageName: 'com.example.android',
|
|
354
|
+
* installApp: true,
|
|
355
|
+
* minimumVersion: '12'
|
|
356
|
+
* },
|
|
357
|
+
* handleCodeInApp: true,
|
|
358
|
+
* linkDomain: 'project-id.firebaseapp.com'
|
|
359
|
+
* };
|
|
360
|
+
* admin.auth()
|
|
361
|
+
* .generatePasswordResetLink('user@example.com', actionCodeSettings)
|
|
362
|
+
* .then(function(link) {
|
|
363
|
+
* // The link was successfully generated.
|
|
364
|
+
* })
|
|
365
|
+
* .catch(function(error) {
|
|
366
|
+
* // Some error occurred, you can inspect the code: error.code
|
|
367
|
+
* });
|
|
368
|
+
* ```
|
|
369
|
+
*
|
|
370
|
+
* @param email - The email address of the user whose password is to be
|
|
371
|
+
* reset.
|
|
372
|
+
* @param actionCodeSettings - The action
|
|
373
|
+
* code settings. If specified, the state/continue URL is set as the
|
|
374
|
+
* "continueUrl" parameter in the password reset link. The default password
|
|
375
|
+
* reset landing page will use this to display a link to go back to the app
|
|
376
|
+
* if it is installed.
|
|
377
|
+
* If the actionCodeSettings is not specified, no URL is appended to the
|
|
378
|
+
* action URL.
|
|
379
|
+
* The state URL provided must belong to a domain that is whitelisted by the
|
|
380
|
+
* developer in the console. Otherwise an error is thrown.
|
|
381
|
+
* Mobile app redirects are only applicable if the developer configures
|
|
382
|
+
* and accepts the Firebase Dynamic Links terms of service.
|
|
383
|
+
* The Android package name and iOS bundle ID are respected only if they
|
|
384
|
+
* are configured in the same Firebase Auth project.
|
|
385
|
+
* @returns A promise that resolves with the generated link.
|
|
386
|
+
*/
|
|
387
|
+
generatePasswordResetLink(email: string, actionCodeSettings?: ActionCodeSettings): Promise<string>;
|
|
388
|
+
/**
|
|
389
|
+
* Generates the out of band email action link to verify the user's ownership
|
|
390
|
+
* of the specified email. The {@link ActionCodeSettings} object provided
|
|
391
|
+
* as an argument to this method defines whether the link is to be handled by a
|
|
392
|
+
* mobile app or browser along with additional state information to be passed in
|
|
393
|
+
* the deep link, etc.
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
* ```javascript
|
|
397
|
+
* var actionCodeSettings = {
|
|
398
|
+
* url: 'https://www.example.com/cart?email=user@example.com&cartId=123',
|
|
399
|
+
* iOS: {
|
|
400
|
+
* bundleId: 'com.example.ios'
|
|
401
|
+
* },
|
|
402
|
+
* android: {
|
|
403
|
+
* packageName: 'com.example.android',
|
|
404
|
+
* installApp: true,
|
|
405
|
+
* minimumVersion: '12'
|
|
406
|
+
* },
|
|
407
|
+
* handleCodeInApp: true,
|
|
408
|
+
* linkDomain: 'project-id.firebaseapp.com'
|
|
409
|
+
* };
|
|
410
|
+
* admin.auth()
|
|
411
|
+
* .generateEmailVerificationLink('user@example.com', actionCodeSettings)
|
|
412
|
+
* .then(function(link) {
|
|
413
|
+
* // The link was successfully generated.
|
|
414
|
+
* })
|
|
415
|
+
* .catch(function(error) {
|
|
416
|
+
* // Some error occurred, you can inspect the code: error.code
|
|
417
|
+
* });
|
|
418
|
+
* ```
|
|
419
|
+
*
|
|
420
|
+
* @param email - The email account to verify.
|
|
421
|
+
* @param actionCodeSettings - The action
|
|
422
|
+
* code settings. If specified, the state/continue URL is set as the
|
|
423
|
+
* "continueUrl" parameter in the email verification link. The default email
|
|
424
|
+
* verification landing page will use this to display a link to go back to
|
|
425
|
+
* the app if it is installed.
|
|
426
|
+
* If the actionCodeSettings is not specified, no URL is appended to the
|
|
427
|
+
* action URL.
|
|
428
|
+
* The state URL provided must belong to a domain that is whitelisted by the
|
|
429
|
+
* developer in the console. Otherwise an error is thrown.
|
|
430
|
+
* Mobile app redirects are only applicable if the developer configures
|
|
431
|
+
* and accepts the Firebase Dynamic Links terms of service.
|
|
432
|
+
* The Android package name and iOS bundle ID are respected only if they
|
|
433
|
+
* are configured in the same Firebase Auth project.
|
|
434
|
+
* @returns A promise that resolves with the generated link.
|
|
435
|
+
*/
|
|
436
|
+
generateEmailVerificationLink(email: string, actionCodeSettings?: ActionCodeSettings): Promise<string>;
|
|
437
|
+
/**
|
|
438
|
+
* Generates an out-of-band email action link to verify the user's ownership
|
|
439
|
+
* of the specified email. The {@link ActionCodeSettings} object provided
|
|
440
|
+
* as an argument to this method defines whether the link is to be handled by a
|
|
441
|
+
* mobile app or browser along with additional state information to be passed in
|
|
442
|
+
* the deep link, etc.
|
|
443
|
+
*
|
|
444
|
+
* @param email - The current email account.
|
|
445
|
+
* @param newEmail - The email address the account is being updated to.
|
|
446
|
+
* @param actionCodeSettings - The action
|
|
447
|
+
* code settings. If specified, the state/continue URL is set as the
|
|
448
|
+
* "continueUrl" parameter in the email verification link. The default email
|
|
449
|
+
* verification landing page will use this to display a link to go back to
|
|
450
|
+
* the app if it is installed.
|
|
451
|
+
* If the actionCodeSettings is not specified, no URL is appended to the
|
|
452
|
+
* action URL.
|
|
453
|
+
* The state URL provided must belong to a domain that is authorized
|
|
454
|
+
* in the console, or an error will be thrown.
|
|
455
|
+
* Mobile app redirects are only applicable if the developer configures
|
|
456
|
+
* and accepts the Firebase Dynamic Links terms of service.
|
|
457
|
+
* The Android package name and iOS bundle ID are respected only if they
|
|
458
|
+
* are configured in the same Firebase Auth project.
|
|
459
|
+
* @returns A promise that resolves with the generated link.
|
|
460
|
+
*/
|
|
461
|
+
generateVerifyAndChangeEmailLink(email: string, newEmail: string, actionCodeSettings?: ActionCodeSettings): Promise<string>;
|
|
462
|
+
/**
|
|
463
|
+
* Generates the out of band email action link to verify the user's ownership
|
|
464
|
+
* of the specified email. The {@link ActionCodeSettings} object provided
|
|
465
|
+
* as an argument to this method defines whether the link is to be handled by a
|
|
466
|
+
* mobile app or browser along with additional state information to be passed in
|
|
467
|
+
* the deep link, etc.
|
|
468
|
+
*
|
|
469
|
+
* @example
|
|
470
|
+
* ```javascript
|
|
471
|
+
* var actionCodeSettings = {
|
|
472
|
+
* url: 'https://www.example.com/cart?email=user@example.com&cartId=123',
|
|
473
|
+
* iOS: {
|
|
474
|
+
* bundleId: 'com.example.ios'
|
|
475
|
+
* },
|
|
476
|
+
* android: {
|
|
477
|
+
* packageName: 'com.example.android',
|
|
478
|
+
* installApp: true,
|
|
479
|
+
* minimumVersion: '12'
|
|
480
|
+
* },
|
|
481
|
+
* handleCodeInApp: true,
|
|
482
|
+
* linkDomain: 'project-id.firebaseapp.com'
|
|
483
|
+
* };
|
|
484
|
+
* admin.auth()
|
|
485
|
+
* .generateEmailVerificationLink('user@example.com', actionCodeSettings)
|
|
486
|
+
* .then(function(link) {
|
|
487
|
+
* // The link was successfully generated.
|
|
488
|
+
* })
|
|
489
|
+
* .catch(function(error) {
|
|
490
|
+
* // Some error occurred, you can inspect the code: error.code
|
|
491
|
+
* });
|
|
492
|
+
* ```
|
|
493
|
+
*
|
|
494
|
+
* @param email - The email account to verify.
|
|
495
|
+
* @param actionCodeSettings - The action
|
|
496
|
+
* code settings. If specified, the state/continue URL is set as the
|
|
497
|
+
* "continueUrl" parameter in the email verification link. The default email
|
|
498
|
+
* verification landing page will use this to display a link to go back to
|
|
499
|
+
* the app if it is installed.
|
|
500
|
+
* If the actionCodeSettings is not specified, no URL is appended to the
|
|
501
|
+
* action URL.
|
|
502
|
+
* The state URL provided must belong to a domain that is whitelisted by the
|
|
503
|
+
* developer in the console. Otherwise an error is thrown.
|
|
504
|
+
* Mobile app redirects are only applicable if the developer configures
|
|
505
|
+
* and accepts the Firebase Dynamic Links terms of service.
|
|
506
|
+
* The Android package name and iOS bundle ID are respected only if they
|
|
507
|
+
* are configured in the same Firebase Auth project.
|
|
508
|
+
* @returns A promise that resolves with the generated link.
|
|
509
|
+
*/
|
|
510
|
+
generateSignInWithEmailLink(email: string, actionCodeSettings: ActionCodeSettings): Promise<string>;
|
|
511
|
+
/**
|
|
512
|
+
* Returns the list of existing provider configurations matching the filter
|
|
513
|
+
* provided. At most, 100 provider configs can be listed at a time.
|
|
514
|
+
*
|
|
515
|
+
* SAML and OIDC provider support requires Google Cloud's Identity Platform
|
|
516
|
+
* (GCIP). To learn more about GCIP, including pricing and features,
|
|
517
|
+
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
|
|
518
|
+
*
|
|
519
|
+
* @param options - The provider config filter to apply.
|
|
520
|
+
* @returns A promise that resolves with the list of provider configs meeting the
|
|
521
|
+
* filter requirements.
|
|
522
|
+
*/
|
|
523
|
+
listProviderConfigs(options: AuthProviderConfigFilter): Promise<ListProviderConfigResults>;
|
|
524
|
+
/**
|
|
525
|
+
* Looks up an Auth provider configuration by the provided ID.
|
|
526
|
+
* Returns a promise that resolves with the provider configuration
|
|
527
|
+
* corresponding to the provider ID specified. If the specified ID does not
|
|
528
|
+
* exist, an `auth/configuration-not-found` error is thrown.
|
|
529
|
+
*
|
|
530
|
+
* SAML and OIDC provider support requires Google Cloud's Identity Platform
|
|
531
|
+
* (GCIP). To learn more about GCIP, including pricing and features,
|
|
532
|
+
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
|
|
533
|
+
*
|
|
534
|
+
* @param providerId - The provider ID corresponding to the provider
|
|
535
|
+
* config to return.
|
|
536
|
+
* @returns A promise that resolves
|
|
537
|
+
* with the configuration corresponding to the provided ID.
|
|
538
|
+
*/
|
|
539
|
+
getProviderConfig(providerId: string): Promise<AuthProviderConfig>;
|
|
540
|
+
/**
|
|
541
|
+
* Deletes the provider configuration corresponding to the provider ID passed.
|
|
542
|
+
* If the specified ID does not exist, an `auth/configuration-not-found` error
|
|
543
|
+
* is thrown.
|
|
544
|
+
*
|
|
545
|
+
* SAML and OIDC provider support requires Google Cloud's Identity Platform
|
|
546
|
+
* (GCIP). To learn more about GCIP, including pricing and features,
|
|
547
|
+
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
|
|
548
|
+
*
|
|
549
|
+
* @param providerId - The provider ID corresponding to the provider
|
|
550
|
+
* config to delete.
|
|
551
|
+
* @returns A promise that resolves on completion.
|
|
552
|
+
*/
|
|
553
|
+
deleteProviderConfig(providerId: string): Promise<void>;
|
|
554
|
+
/**
|
|
555
|
+
* Returns a promise that resolves with the updated `AuthProviderConfig`
|
|
556
|
+
* corresponding to the provider ID specified.
|
|
557
|
+
* If the specified ID does not exist, an `auth/configuration-not-found` error
|
|
558
|
+
* is thrown.
|
|
559
|
+
*
|
|
560
|
+
* SAML and OIDC provider support requires Google Cloud's Identity Platform
|
|
561
|
+
* (GCIP). To learn more about GCIP, including pricing and features,
|
|
562
|
+
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
|
|
563
|
+
*
|
|
564
|
+
* @param providerId - The provider ID corresponding to the provider
|
|
565
|
+
* config to update.
|
|
566
|
+
* @param updatedConfig - The updated configuration.
|
|
567
|
+
* @returns A promise that resolves with the updated provider configuration.
|
|
568
|
+
*/
|
|
569
|
+
updateProviderConfig(providerId: string, updatedConfig: UpdateAuthProviderRequest): Promise<AuthProviderConfig>;
|
|
570
|
+
/**
|
|
571
|
+
* Returns a promise that resolves with the newly created `AuthProviderConfig`
|
|
572
|
+
* when the new provider configuration is created.
|
|
573
|
+
*
|
|
574
|
+
* SAML and OIDC provider support requires Google Cloud's Identity Platform
|
|
575
|
+
* (GCIP). To learn more about GCIP, including pricing and features,
|
|
576
|
+
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
|
|
577
|
+
*
|
|
578
|
+
* @param config - The provider configuration to create.
|
|
579
|
+
* @returns A promise that resolves with the created provider configuration.
|
|
580
|
+
*/
|
|
581
|
+
createProviderConfig(config: AuthProviderConfig): Promise<AuthProviderConfig>;
|
|
279
582
|
/**
|
|
280
583
|
* Gets an OAuth2 access token from Google's OAuth2 server. This token is
|
|
281
584
|
* required for accessing the Firebase Auth REST API via fetch requests.
|