Skip to content
LogoLogo

Auth schema

See Management API schema for every domain, the endpoint and authentication.

Queries

user

Reads the signed-in user. Null when the caller is an API key or the auth service rejects the token. Exempt from the MFA policy, so a user the policy gates can read mfa and mfaFactors.

user: User @auth(mfa: EXEMPT)

viewerScopes

Lists the scopes the caller holds outside any organization, such as ORGANIZATION_CREATE. Empty for an API key. Organization.viewerScopes lists the scopes held in one organization.

viewerScopes: [Scope!]! @auth

oauthConsentDetails

Reads an OAuth authorisation request waiting for the signed-in user's consent. Reading a request the user already consented to approves it.

oauthConsentDetails(input: OAuthConsentDetailsInput!): OAuthConsentDetailsPayload! @auth(only: USER)

Mutations

sessionStart

Begins a sign-in from an email address alone: answers PASSWORD, or emails a sign-in code and answers EMAIL_CODE. Never creates an account. Returns RATE_LIMITED past 10 requests a minute from one IP address, or when the project's email quota is spent.

sessionStart(input: SessionStartInput!): SessionStartPayload! @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "sign-in-email", key: EMAIL)

sessionCreate

Signs in with an email address and password and returns an AAL1 session.

sessionCreate(input: SessionCreateInput!): SessionCreatePayload! @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "sign-in-email", key: EMAIL)

sessionRefresh

Exchanges a refresh token for a new session.

sessionRefresh(input: SessionRefreshInput!): SessionRefreshPayload! @rateLimit(rule: "session-refresh-ip", key: IP)

accountCreate

Registers an email address and emails it a confirmation code and link. The response does not reveal whether the address has an account. Returns RATE_LIMITED when the project's email quota is spent.

accountCreate(input: AccountCreateInput!): AccountCreatePayload! @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "sign-in-email", key: EMAIL)

accountVerifyEmail

Verifies the six-digit code from a confirmation or sign-in email and creates a session.

accountVerifyEmail(input: AccountVerifyEmailInput!): AccountVerifyEmailPayload! @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "sign-in-email", key: EMAIL)

accountResendVerification

Emails an existing account a new code and link: a confirmation, or a sign-in for a confirmed account. An address with no account returns an error, so the response reveals whether an account exists. An address emailed within the minimum send interval returns RATE_LIMITED.

accountResendVerification(input: AccountResendVerificationInput!): AccountResendVerificationPayload! @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "sign-in-email", key: EMAIL)

oauthAuthorize

Creates the provider URL that starts a sign-in with an OAuth provider.

oauthAuthorize(input: OAuthAuthorizeInput!): OAuthAuthorizePayload! @rateLimit(rule: "sign-in-ip", key: IP)

oauthCallback

Exchanges the authorisation code from an OAuth provider's redirect for a session.

oauthCallback(input: OAuthCallbackInput!): OAuthCallbackPayload! @rateLimit(rule: "sign-in-ip", key: IP)

oauthConsentApprove

Approves an OAuth authorisation request for the signed-in user.

oauthConsentApprove(input: OAuthConsentApproveInput!): OAuthConsentActionPayload! @auth(only: USER)

oauthConsentDeny

Denies an OAuth authorisation request for the signed-in user.

oauthConsentDeny(input: OAuthConsentDenyInput!): OAuthConsentActionPayload! @auth(only: USER)

magicLinkSend

Emails an existing account a sign-in code and link. Never creates an account, and answers success: true for an address with no account.

magicLinkSend(input: MagicLinkSendInput!): MagicLinkSendPayload! @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "sign-in-email", key: EMAIL)

magicLinkVerify

Verifies the six-digit code from a sign-in or confirmation email and creates a session.

magicLinkVerify(input: MagicLinkVerifyInput!): MagicLinkVerifyPayload! @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "sign-in-email", key: EMAIL)

emailLinkVerify

Verifies the link from a password-reset, invitation, sign-in or confirmation email and creates a session. The link works once: call this when the recipient confirms, never on opening the link, which an email security scanner may do before delivery.

emailLinkVerify(input: EmailLinkVerifyInput!): EmailLinkVerifyPayload! @rateLimit(rule: "sign-in-ip", key: IP)

passwordResetSend

Sends a password-reset email. Returns RATE_LIMITED when the address was emailed within the minimum send interval or the project's email quota is spent.

passwordResetSend(input: PasswordResetSendInput!): PasswordResetSendPayload! @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "sign-in-email", key: EMAIL)

passwordUpdate

Sets the signed-in user's password without asking for the current one. Ends the user's other sessions and keeps the caller's. An AAL1 session may set a password only while the user holds no verified factor, and otherwise gets MFA_REQUIRED.

passwordUpdate(input: PasswordUpdateInput!): PasswordUpdatePayload! @auth(mfa: EXEMPT) @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "mfa-user", key: USER)

mfaFactorEnroll

Enrols an authenticator app for the caller and returns its secret, once. First deletes the caller's unverified factors, except the two newest enrolled in the last minute; one holding the given friendlyName is deleted however new.

mfaFactorEnroll(input: MfaFactorEnrollInput!): MfaFactorEnrollPayload! @auth(only: USER, mfa: EXEMPT) @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "mfa-user", key: USER)

mfaChallengeCreate

Opens a challenge against one of the caller's factors.

mfaChallengeCreate(input: MfaChallengeCreateInput!): MfaChallengeCreatePayload! @auth(only: USER, mfa: EXEMPT) @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "mfa-user", key: USER)

mfaChallengeVerify

Verifies an authenticator code against a challenge and returns the caller's session at AAL2. The user's other sessions keep their level. A wrong code returns MFA_CHALLENGE_FAILED, and an expired challenge TOKEN_EXPIRED.

mfaChallengeVerify(input: MfaChallengeVerifyInput!): MfaChallengeVerifyPayload! @auth(only: USER, mfa: EXEMPT) @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "mfa-user", key: USER)

mfaFactorUnenroll

Removes one of the caller's factors. Removing a verified factor needs an AAL2 session, and otherwise returns MFA_REQUIRED. A user the MFA policy requires cannot remove their last verified factor (VALIDATION_ERROR).

mfaFactorUnenroll(input: MfaFactorUnenrollInput!): MfaFactorUnenrollPayload! @auth(only: USER, mfa: EXEMPT) @rateLimit(rule: "sign-in-ip", key: IP) @rateLimit(rule: "mfa-user", key: USER)

Types

AuthErrorCode

"""
The code in `extensions.code` of an error an auth operation returns. Branch on the code, not on
the message.
"""
enum AuthErrorCode {
  """The email address or password is wrong."""
  INVALID_CREDENTIALS
  """The email address is not confirmed."""
  EMAIL_NOT_CONFIRMED
  """No user matches."""
  USER_NOT_FOUND
  """A user with the email address already exists."""
  USER_ALREADY_EXISTS
  """Sign-up refused to create a new user."""
  SIGNUP_DISABLED
  """The password does not meet the strength rules."""
  WEAK_PASSWORD
  """The token or code is invalid."""
  INVALID_TOKEN
  """The token, code or MFA challenge has expired."""
  TOKEN_EXPIRED
  """The authenticator code is wrong, or the challenge was rejected."""
  MFA_CHALLENGE_FAILED
  """No factor with the ID belongs to the caller."""
  MFA_FACTOR_NOT_FOUND
  """
  The operation needs an `AAL2` session: the caller is staff, belongs to an organization that
  requires two-factor authentication, or is removing a verified factor or setting a password while
  holding one. Verify a factor with `mfaChallengeVerify` and retry with the returned session.
  """
  MFA_REQUIRED
  """The OAuth provider returned an error."""
  OAUTH_PROVIDER_ERROR
  """Too many requests, or too many emails sent."""
  RATE_LIMITED
}

AuthenticatorAssuranceLevel

"""
How many authentication factors a session has passed, as NIST 800-63 defines the levels. Read from
the session's access token.
"""
enum AuthenticatorAssuranceLevel {
  """One factor: a password, an emailed code or an OAuth provider."""
  AAL1
  """Two factors: the first factor and a verified authenticator code."""
  AAL2
}

IdentityProvider

"""The provider that issued one of a user's identities."""
enum IdentityProvider {
  """Email address."""
  EMAIL
  """Google."""
  GOOGLE
}

OAuthProvider

"""An OAuth provider a user can sign in with."""
enum OAuthProvider {
  """Google."""
  GOOGLE
}

MfaFactorType

"""The kind of an MFA factor."""
enum MfaFactorType {
  """
  An authenticator app that generates time-based one-time codes (RFC 6238).
  """
  TOTP
}

MfaFactorStatus

"""
Whether an MFA factor has been verified. A factor starts `UNVERIFIED` and becomes `VERIFIED` when
`mfaChallengeVerify` accepts a code from it.
"""
enum MfaFactorStatus {
  """Enrolled, with no code verified yet."""
  UNVERIFIED
  """Verified and active."""
  VERIFIED
}

MfaState

"""Whether a user holds a verified MFA factor."""
enum MfaState {
  """The user holds at least one verified factor."""
  ENROLLED
  """The user holds no verified factor."""
  NOT_ENROLLED
}

Identity

"""
An account at an identity provider that a user signs in with. A user can have several.
"""
type Identity {
  """The ID of the identity."""
  id: ID!
  """The provider that issued the identity."""
  provider: IdentityProvider!
  """The email address the provider reports. Null when it reports none."""
  email: String
  """
  The claims and profile fields the provider reports. The shape depends on the provider.
  """
  identityData: JSON
  """When the identity was created."""
  createdAt: DateTime!
  """
  When the user last signed in with this identity. Null when they never have.
  """
  lastSignInAt: DateTime
}

MfaFactor

"""
An authenticator app a user has enrolled as a second factor. Removing a `VERIFIED` factor needs an
`AAL2` session, and a user the MFA policy requires cannot remove their last `VERIFIED` factor.
"""
type MfaFactor {
  """The ID of the factor."""
  id: ID!
  """The kind of factor."""
  factorType: MfaFactorType!
  """Whether the factor has been verified."""
  status: MfaFactorStatus!
  """
  The name of the factor, shown on the account page. Null when none is set.
  """
  friendlyName: String
  """When the factor was enrolled."""
  createdAt: DateTime!
}

MfaTotpEnrollment

"""
What an authenticator app needs to add a new TOTP factor. Returned once, by `mfaFactorEnroll`; the
secret is never returned again.
"""
type MfaTotpEnrollment {
  """SVG markup of a QR code that encodes `uri`."""
  qrCode: String!
  """The base32 secret, for an authenticator that cannot scan."""
  secret: String!
  """The `otpauth://` URI the QR code encodes."""
  uri: String!
}

MfaRequirementReason

"""Why a user must hold a verified second factor."""
enum MfaRequirementReason {
  """The user is a super admin or a client manager."""
  STAFF
  """The user belongs to an organization with `requireMfa` on."""
  ORGANIZATION
}

UserMfaStatus

"""Where a user stands against the multi-factor authentication policy."""
type UserMfaStatus {
  """
  Whether the user must hold an `AAL2` session to use the fields the policy guards.
  """
  required: Boolean!
  """Why the user is required. Null when `required` is false."""
  reason: MfaRequirementReason
  """Whether the user holds at least one `VERIFIED` factor."""
  enrolled: Boolean!
  """
  Whether the session this status was read with meets the requirement: the user is not required,
  or the session is at `AAL2`.
  """
  satisfied: Boolean!
}

User

"""
A signed-in user. `invitations` and `organizations` return `MFA_REQUIRED` for a user the MFA
policy gates; the other fields stay readable.
"""
type User {
  """The ID of the user."""
  id: ID!
  """The user's primary email address. Null when the account has none."""
  email: String
  """When the user confirmed their email address. Null until confirmed."""
  emailConfirmedAt: DateTime
  """The user's phone number, in E.164 format. Null when none is set."""
  phone: String
  """When the user confirmed their phone number. Null until confirmed."""
  phoneConfirmedAt: DateTime
  """The identities the user signs in with."""
  identities: [Identity!]!
  """The user's MFA factors, verified or not."""
  mfaFactors: [MfaFactor!]!
  """Where the user stands against the multi-factor authentication policy."""
  mfa: UserMfaStatus!
  """
  Whether the user has chosen a password. False for an account created by an emailed code, an
  invitation or Google until `passwordUpdate` sets one.
  """
  passwordSet: Boolean!
  """
  Metadata the server manages, such as provider claims and role flags. The user cannot change it.
  """
  appMetadata: JSON
  """Metadata the user can change, such as a display name and preferences."""
  userMetadata: JSON
  """When the user was created."""
  createdAt: DateTime!
  """When the user last changed."""
  updatedAt: DateTime!
  """
  The pending organization invitations addressed to the user's email address.
  """
  invitations(first: Int, after: String): ViewerInvitationConnection! @auth
  """
  The organizations the user belongs to; for a staff caller, every organization. `search` filters
  by name (case-insensitive substring); `sortKey` and `reverse` set the order.
  """
  organizations(first: Int, after: String, search: String, sortKey: OrganizationSortKeys = NAME, reverse: Boolean = false): OrganizationConnection! @auth
}

Session

"""
The result of a sign-in: an access token, a refresh token, and when the access token expires.
Send `accessToken` as `Authorization: Bearer <token>`; exchange `refreshToken` through
`sessionRefresh` for a new session before the access token expires.
"""
type Session {
  """The access token (a JWT) that authenticates API requests."""
  accessToken: String!
  """The refresh token. Single-use: `sessionRefresh` returns a new one."""
  refreshToken: String!
  """When the access token expires."""
  expiresAt: DateTime!
  """The signed-in user."""
  user: User!
  """The session's assurance level, read from `accessToken`."""
  aal: AuthenticatorAssuranceLevel!
}

SessionStartMethod

"""How a user finishes a sign-in that `sessionStart` began."""
enum SessionStartMethod {
  """
  The account has a password: call `sessionCreate` with it. No email is sent.
  """
  PASSWORD
  """
  A six-digit code and a link were emailed to the address, if it has an account. Finish with
  `magicLinkVerify` or the link. An address with no account also answers `EMAIL_CODE` and is sent
  nothing.
  """
  EMAIL_CODE
}

SessionStartInput

"""The input of `sessionStart`."""
input SessionStartInput {
  """The email address to sign in with."""
  email: String!
  """
  The URL the emailed link returns to. Must match a registered redirect URL.
  """
  redirectUrl: String
}

SessionStartPayload

"""
The result of `sessionStart`. `method` reveals whether a registered address has a password. An
address without one and an unknown address both answer `EMAIL_CODE`, though the response time can
differ because only a registered address is emailed.
"""
type SessionStartPayload {
  """How the user finishes signing in."""
  method: SessionStartMethod!
}

SessionCreateInput

"""The input of `sessionCreate`."""
input SessionCreateInput {
  """The user's email address."""
  email: String!
  """The user's password."""
  password: String!
}

SessionCreatePayload

"""
The result of `sessionCreate`. The session is at `AAL1`: when `session.user.mfa.required` or
`enrolled` is true, finish with `mfaChallengeCreate` and `mfaChallengeVerify` (or `mfaFactorEnroll`
first when nothing is enrolled) before calling guarded fields.
"""
type SessionCreatePayload {
  """The new session."""
  session: Session
}

SessionRefreshInput

"""The input of `sessionRefresh`."""
input SessionRefreshInput {
  """The refresh token of the current session."""
  refreshToken: String!
}

SessionRefreshPayload

"""The result of `sessionRefresh`."""
type SessionRefreshPayload {
  """The new session, with a new `accessToken` and `refreshToken`."""
  session: Session
}

AccountCreateInput

"""
The input of `accountCreate`. Registration takes no password: the user sets one with
`passwordUpdate` after confirming the address.
"""
input AccountCreateInput {
  """The email address to register."""
  email: String!
  """
  The URL the confirmation link returns to. Must match a registered redirect URL; otherwise the
  link returns to the site URL.
  """
  redirectUrl: String
  """Metadata to store in the user's `userMetadata`."""
  metadata: JSON
}

AccountCreatePayload

"""
The result of `accountCreate`. The payload is the same whether or not the address has an account:
a new or unconfirmed address is emailed a confirmation code and link, and a confirmed account a
sign-in code and link.
"""
type AccountCreatePayload {
  """
  Whether the request succeeded. Also true when the address was emailed within the minimum send
  interval; the earlier email's code and link stay valid.
  """
  success: Boolean!
}

AccountVerifyEmailInput

"""The input of `accountVerifyEmail`."""
input AccountVerifyEmailInput {
  """The email address the code was sent to."""
  email: String!
  """The six-digit code from the email."""
  token: String!
}

AccountVerifyEmailPayload

"""The result of `accountVerifyEmail`."""
type AccountVerifyEmailPayload {
  """The session for the confirmed user."""
  session: Session
}

AccountResendVerificationInput

"""The input of `accountResendVerification`."""
input AccountResendVerificationInput {
  """The email address to send the code to."""
  email: String!
}

AccountResendVerificationPayload

"""The result of `accountResendVerification`."""
type AccountResendVerificationPayload {
  """Whether the email was sent."""
  success: Boolean!
}

OAuthAuthorizeInput

"""The input of `oauthAuthorize`."""
input OAuthAuthorizeInput {
  """The provider to sign in with."""
  provider: OAuthProvider!
  """
  The URL the provider returns the user to. Its host selects the tenant, and an unknown host
  selects the default one. Outside `picked.app`, the user returns to the same path on the
  dashboard's own origin.
  """
  redirectUrl: String!
  """Provider scopes to request in addition to the defaults."""
  scopes: [String!]
}

OAuthAuthorizePayload

"""The result of `oauthAuthorize`."""
type OAuthAuthorizePayload {
  """The provider URL to send the user to."""
  url: String
}

OAuthCallbackInput

"""The input of `oauthCallback`."""
input OAuthCallbackInput {
  """The provider that issued the code."""
  provider: OAuthProvider!
  """The authorisation code from the provider's redirect."""
  code: String!
}

OAuthCallbackPayload

"""The result of `oauthCallback`."""
type OAuthCallbackPayload {
  """The session for the signed-in user."""
  session: Session
}

OAuthConsentClient

"""The OAuth client that asks for a user's consent."""
type OAuthConsentClient {
  """The client ID."""
  id: String!
  """The client's display name."""
  name: String!
  """The client's homepage. Null when not set."""
  uri: String
  """The URL of the client's logo. Null when not set."""
  logoUri: String
}

OAuthConsentDetails

"""An OAuth authorisation request waiting for the user's consent."""
type OAuthConsentDetails {
  """
  The ID of the request, for `oauthConsentApprove` or `oauthConsentDeny`.
  """
  authorizationId: String!
  """The client that asks for access."""
  client: OAuthConsentClient!
  """The signed-in user's email address."""
  userEmail: String!
  """The scopes the client asks for, separated by spaces."""
  scope: String!
  """Always null."""
  redirectUrl: String @deprecated(reason: "Use OAuthConsentDetailsPayload.redirectUrl.")
}

OAuthConsentDetailsInput

"""The input of `oauthConsentDetails`."""
input OAuthConsentDetailsInput {
  """The `authorization_id` query parameter of the consent URL."""
  authorizationId: String!
}

OAuthConsentDetailsPayload

"""
The result of `oauthConsentDetails`. Exactly one field is set: `details` when the user has not
yet consented to the client for these scopes, and `redirectUrl` when they have. In that case the
read itself approves the request: skip the prompt and send the user to `redirectUrl`.
"""
type OAuthConsentDetailsPayload {
  """
  The request to show on the consent prompt. Null when `redirectUrl` is set.
  """
  details: OAuthConsentDetails
  """
  Where to send the user when consent was already given. Null when `details` is set.
  """
  redirectUrl: String
}

OAuthConsentApproveInput

"""The input of `oauthConsentApprove`."""
input OAuthConsentApproveInput {
  """The ID of the request to approve."""
  authorizationId: String!
}

OAuthConsentDenyInput

"""The input of `oauthConsentDeny`."""
input OAuthConsentDenyInput {
  """The ID of the request to deny."""
  authorizationId: String!
}

OAuthConsentActionPayload

"""The result of `oauthConsentApprove` and `oauthConsentDeny`."""
type OAuthConsentActionPayload {
  """Where to send the user after the decision."""
  redirectUrl: String!
}

MagicLinkSendInput

"""The input of `magicLinkSend`."""
input MagicLinkSendInput {
  """The email address to send the code to."""
  email: String!
  """
  The URL the emailed link returns to. Must match a registered redirect URL.
  """
  redirectUrl: String
}

MagicLinkSendPayload

"""The result of `magicLinkSend`."""
type MagicLinkSendPayload {
  """
  Always true: an address with no account, or one emailed within the minimum send interval, also
  answers true.
  """
  success: Boolean!
}

MagicLinkVerifyInput

"""The input of `magicLinkVerify`."""
input MagicLinkVerifyInput {
  """The email address the code was sent to."""
  email: String!
  """The six-digit code from the email."""
  token: String!
}

MagicLinkVerifyPayload

"""The result of `magicLinkVerify`."""
type MagicLinkVerifyPayload {
  """The session for the signed-in user."""
  session: Session
}

EmailLinkType

"""The kind of email a link passed to `emailLinkVerify` came from."""
enum EmailLinkType {
  """A password-reset email."""
  RECOVERY
  """An invitation to an organization, sent to an address with no account."""
  INVITE
  """A sign-in email to a confirmed account."""
  MAGIC_LINK
  """A confirmation email for a new registration."""
  SIGNUP
}

EmailLinkVerifyInput

"""The input of `emailLinkVerify`."""
input EmailLinkVerifyInput {
  """The `token_hash` parameter of the emailed link."""
  tokenHash: String!
  """The kind of email the link came from."""
  type: EmailLinkType!
}

EmailLinkVerifyPayload

"""The result of `emailLinkVerify`."""
type EmailLinkVerifyPayload {
  """The session for the signed-in user."""
  session: Session
}

PasswordResetSendInput

"""The input of `passwordResetSend`."""
input PasswordResetSendInput {
  """The email address to send the reset email to."""
  email: String!
  """The URL the reset link returns to, where the user sets a new password."""
  redirectUrl: String
}

PasswordResetSendPayload

"""The result of `passwordResetSend`."""
type PasswordResetSendPayload {
  """Whether the request succeeded."""
  success: Boolean!
}

PasswordUpdateInput

"""The input of `passwordUpdate`. Every field is required."""
input PasswordUpdateInput {
  """The new password. Must meet the password strength rules."""
  newPassword: String!
}

PasswordUpdatePayload

"""The result of `passwordUpdate`."""
type PasswordUpdatePayload {
  """Whether the password changed."""
  success: Boolean!
  """Always null; the caller's session stays valid."""
  session: Session
}

MfaFactorEnrollInput

"""The input of `mfaFactorEnroll`."""
input MfaFactorEnrollInput {
  """
  The name of the factor, shown on the account page. Defaults to "Authenticator app", numbered
  ("Authenticator app 2", …) past the names the caller's factors hold.
  """
  friendlyName: String
}

MfaFactorEnrollPayload

"""
The result of `mfaFactorEnroll`. `totp` carries the factor's secret, which is returned only here.
"""
type MfaFactorEnrollPayload {
  """
  The new factor, `UNVERIFIED` until `mfaChallengeVerify` accepts a code from it.
  """
  factor: MfaFactor!
  """What an authenticator app needs to add the factor."""
  totp: MfaTotpEnrollment!
}

MfaChallengeCreateInput

"""The input of `mfaChallengeCreate`."""
input MfaChallengeCreateInput {
  """The ID of the factor to challenge."""
  factorId: ID!
}

MfaChallengeCreatePayload

"""The result of `mfaChallengeCreate`."""
type MfaChallengeCreatePayload {
  """The ID of the challenge, for `mfaChallengeVerify`."""
  challengeId: ID!
  """When the challenge stops accepting codes."""
  expiresAt: DateTime!
}

MfaChallengeVerifyInput

"""The input of `mfaChallengeVerify`."""
input MfaChallengeVerifyInput {
  """The ID of the factor."""
  factorId: ID!
  """The ID of the challenge."""
  challengeId: ID!
  """The six-digit code from the authenticator app."""
  code: String!
}

MfaChallengeVerifyPayload

"""The result of `mfaChallengeVerify`."""
type MfaChallengeVerifyPayload {
  """
  The caller's session at `AAL2`, with a new `accessToken` and `refreshToken`.
  """
  session: Session
}

MfaFactorUnenrollInput

"""The input of `mfaFactorUnenroll`."""
input MfaFactorUnenrollInput {
  """The ID of the factor to remove."""
  factorId: ID!
}

MfaFactorUnenrollPayload

"""The result of `mfaFactorUnenroll`."""
type MfaFactorUnenrollPayload {
  """Whether the factor was removed."""
  success: Boolean!
}