Skip to content

Authentication types

The types the authentication domain defines, with the fields other domains add to them.

Objects

AuthenticationError

Implements Error

FieldTypeDescription
codeAuthenticationErrorCodeType!Error code indicating the type of authentication failure
messageString!Human readable error message describing the authentication failure. Not intended for end users.

CartMerge

What signing in did with the session's guest cart.

FieldTypeDescription
mergedBoolean!Whether the guest cart's items were added to a cart the customer had saved. False when the guest cart simply became the customer's.
addedQuantityInt!How many items the saved cart brought in on top of the guest cart's, counted by quantity. 0 when nothing was merged.
undoableBoolean!Whether cartMergeUndo can restore the guest cart.

CartMergeUndoResponse

Response for undoing the cart merge of a sign-in

FieldTypeDescription
successBoolean!Whether the guest cart was restored. It is then the current cart, so refetch the cart query.
cartErrors[CartMergeUndoError!]Error details if the merge could not be undone

CreateGuestSessionResponse

Response type for creating a guest session

FieldTypeDescription
successBoolean!Whether the guest session was created successfully

CustomerLoginResponse

FieldTypeDescription
customerCustomerAuthenticated customer account information
cartMergeCartMergeWhat signing in did with the session's guest cart. Null when the session had none.
customerErrors[CustomerLoginError!]Error details if authentication failed

CustomerLogoutResponse

FieldTypeDescription
successBoolean!Whether the session was terminated
customerErrors[CustomerLogoutError!]Error details if logout failed

CustomerPasswordResetRequestResponse

FieldTypeDescription
successBoolean!Indicates if the password reset request was successful
customerErrors[CustomerPasswordResetRequestError!]Error details if the request failed

CustomerPasswordResetResponse

FieldTypeDescription
customerCustomerUpdated customer account information after password reset
customerErrors[CustomerPasswordResetError!]Error details if the password reset failed

CustomerPasswordUpdateResponse

FieldTypeDescription
customerCustomerUpdated customer account information after password reset
customerErrors[CustomerPasswordUpdateError!]Error details if the password update failed

PasswordChangeError

Implements Error

FieldTypeDescription
codePasswordChangeErrorCodeType!Error code indicating the specific password change failure
messageString!Human readable error message describing the password change failure. Not intended for end users.

PasswordResetError

Implements Error

FieldTypeDescription
codePasswordResetErrorCodeType!Error code indicating the specific password reset failure
messageString!Human readable error message describing the password reset failure. Not intended for end users.

RefreshTokenResponse

FieldTypeDescription
successBoolean!Indicates if the token refresh was successful
customerErrors[RefreshTokenError!]Error details if token refresh failed

Enums

AuthenticationErrorCodeType

INVALID_CREDENTIALSInvalid credentials provided
ACCOUNT_INACTIVEAccount is inactive or blocked

PasswordChangeErrorCodeType

INVALID_CURRENT_PASSWORDThe current password provided is incorrect
PASSWORDS_CANT_MATCHThe new password is the same as the current password

PasswordResetErrorCodeType

INVALID_TOKENThe password reset token is invalid or expired
TOKEN_NOT_FOUNDThe password reset token was not found

Unions

CartMergeUndoError

Error union for undoing a cart merge

One of ValidationError or CartError.

CustomerLoginError

One of AuthenticationError or ValidationError.

CustomerLogoutError

One of ValidationError.

CustomerPasswordResetError

One of PasswordResetError or ValidationError.

CustomerPasswordResetRequestError

One of ValidationError.

CustomerPasswordUpdateError

One of PasswordChangeError or ValidationError.

RefreshTokenError

One of ValidationError.