store totp_identifier to credentials with fallback for login runs (#4154)
This commit is contained in:
@@ -34,6 +34,11 @@ class PasswordCredentialResponse(BaseModel):
|
||||
description="Type of 2FA method used for this credential",
|
||||
examples=[TotpType.AUTHENTICATOR],
|
||||
)
|
||||
totp_identifier: str | None = Field(
|
||||
default=None,
|
||||
description="Identifier (email or phone number) used to fetch TOTP codes",
|
||||
examples=["user@example.com", "+14155550123"],
|
||||
)
|
||||
|
||||
|
||||
class CreditCardCredentialResponse(BaseModel):
|
||||
@@ -58,6 +63,11 @@ class PasswordCredential(BaseModel):
|
||||
description="Type of 2FA method used for this credential",
|
||||
examples=[TotpType.AUTHENTICATOR],
|
||||
)
|
||||
totp_identifier: str | None = Field(
|
||||
default=None,
|
||||
description="Identifier (email or phone number) used to fetch TOTP codes",
|
||||
examples=["user@example.com", "+14155550123"],
|
||||
)
|
||||
|
||||
|
||||
class NonEmptyPasswordCredential(PasswordCredential):
|
||||
@@ -155,6 +165,11 @@ class Credential(BaseModel):
|
||||
description="Type of 2FA method used for this credential",
|
||||
examples=[TotpType.AUTHENTICATOR],
|
||||
)
|
||||
totp_identifier: str | None = Field(
|
||||
default=None,
|
||||
description="Identifier (email or phone number) used to fetch TOTP codes",
|
||||
examples=["user@example.com", "+14155550123"],
|
||||
)
|
||||
card_last4: str | None = Field(..., description="For credit_card credentials: the last four digits of the card")
|
||||
card_brand: str | None = Field(..., description="For credit_card credentials: the card brand")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user