@@ -19,10 +19,10 @@ import { deepCopy } from '../utils/deep-copy';
1919import { AuthClientErrorCode , FirebaseAuthError } from '../utils/error' ;
2020
2121/**
22- * Interface representing base properties of a user enrolled second factor for a
22+ * Interface representing base properties of a user- enrolled second factor for a
2323 * `CreateRequest`.
2424 */
25- export interface CreateMultiFactorInfoRequest {
25+ export interface BaseCreateMultiFactorInfoRequest {
2626
2727 /**
2828 * The optional display name for an enrolled second factor.
@@ -36,10 +36,10 @@ export interface CreateMultiFactorInfoRequest {
3636}
3737
3838/**
39- * Interface representing a phone specific user enrolled second factor for a
39+ * Interface representing a phone specific user- enrolled second factor for a
4040 * `CreateRequest`.
4141 */
42- export interface CreatePhoneMultiFactorInfoRequest extends CreateMultiFactorInfoRequest {
42+ export interface CreatePhoneMultiFactorInfoRequest extends BaseCreateMultiFactorInfoRequest {
4343
4444 /**
4545 * The phone number associated with a phone second factor.
@@ -48,10 +48,16 @@ export interface CreatePhoneMultiFactorInfoRequest extends CreateMultiFactorInfo
4848}
4949
5050/**
51- * Interface representing common properties of a user enrolled second factor
51+ * Type representing the properties of a user-enrolled second factor
52+ * for a `CreateRequest`.
53+ */
54+ export type CreateMultiFactorInfoRequest = | CreatePhoneMultiFactorInfoRequest ;
55+
56+ /**
57+ * Interface representing common properties of a user-enrolled second factor
5258 * for an `UpdateRequest`.
5359 */
54- export interface UpdateMultiFactorInfoRequest {
60+ export interface BaseUpdateMultiFactorInfoRequest {
5561
5662 /**
5763 * The ID of the enrolled second factor. This ID is unique to the user. When not provided,
@@ -76,17 +82,23 @@ export interface UpdateMultiFactorInfoRequest {
7682}
7783
7884/**
79- * Interface representing a phone specific user enrolled second factor
85+ * Interface representing a phone specific user- enrolled second factor
8086 * for an `UpdateRequest`.
8187 */
82- export interface UpdatePhoneMultiFactorInfoRequest extends UpdateMultiFactorInfoRequest {
88+ export interface UpdatePhoneMultiFactorInfoRequest extends BaseUpdateMultiFactorInfoRequest {
8389
8490 /**
8591 * The phone number associated with a phone second factor.
8692 */
8793 phoneNumber : string ;
8894}
8995
96+ /**
97+ * Type representing the properties of a user-enrolled second factor
98+ * for an `UpdateRequest`.
99+ */
100+ export type UpdateMultiFactorInfoRequest = | UpdatePhoneMultiFactorInfoRequest ;
101+
90102/**
91103 * The multi-factor related user settings for create operations.
92104 */
@@ -357,6 +369,17 @@ export interface OIDCUpdateAuthProviderRequest {
357369 * configuration's value is not modified.
358370 */
359371 issuer ?: string ;
372+
373+ /**
374+ * The OIDC provider's client secret to enable OIDC code flow.
375+ * If not provided, the existing configuration's value is not modified.
376+ */
377+ clientSecret ?: string ;
378+
379+ /**
380+ * The OIDC provider's response object for OAuth authorization flow.
381+ */
382+ responseType ?: OAuthResponseType ;
360383}
361384
362385export type UpdateAuthProviderRequest =
@@ -768,7 +791,7 @@ export class EmailSignInConfig implements EmailSignInProviderConfig {
768791/**
769792 * The base Auth provider configuration interface.
770793 */
771- export interface AuthProviderConfig {
794+ export interface BaseAuthProviderConfig {
772795
773796 /**
774797 * The provider ID defined by the developer.
@@ -796,7 +819,7 @@ export interface AuthProviderConfig {
796819 * Auth provider configuration interface. A SAML provider can be created via
797820 * {@link auth.Auth.createProviderConfig `createProviderConfig()`}.
798821 */
799- export interface SAMLAuthProviderConfig extends AuthProviderConfig {
822+ export interface SAMLAuthProviderConfig extends BaseAuthProviderConfig {
800823
801824 /**
802825 * The SAML IdP entity identifier.
@@ -862,7 +885,7 @@ export interface OAuthResponseType {
862885 * provider configuration interface. An OIDC provider can be created via
863886 * {@link auth.Auth.createProviderConfig `createProviderConfig()`}.
864887 */
865- export interface OIDCAuthProviderConfig extends AuthProviderConfig {
888+ export interface OIDCAuthProviderConfig extends BaseAuthProviderConfig {
866889
867890 /**
868891 * This is the required client ID used to confirm the audience of an OIDC
@@ -889,8 +912,23 @@ export interface OIDCAuthProviderConfig extends AuthProviderConfig {
889912 * [spec](https://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation).
890913 */
891914 issuer : string ;
915+
916+ /**
917+ * The OIDC provider's client secret to enable OIDC code flow.
918+ */
919+ clientSecret ?: string ;
920+
921+ /**
922+ * The OIDC provider's response object for OAuth authorization flow.
923+ */
924+ responseType ?: OAuthResponseType ;
892925}
893926
927+ /**
928+ * The Auth provider configuration type.
929+ * {@link auth.Auth.createProviderConfig `createProviderConfig()`}.
930+ */
931+ export type AuthProviderConfig = SAMLAuthProviderConfig | OIDCAuthProviderConfig ;
894932
895933/**
896934 * Defines the SAMLConfig class used to convert a client side configuration to its
0 commit comments