All Release Notes

Introduced AuthenticationMode for Customer

17 March 2022
Enhancement
CustomersGraphQL

We introduced the AuthenticationMode that controls whether the password field is required for a Customer in public beta. The Password authentication mode is the default mode for backwards compatibility that requires to set a password for the Customer. For use cases where Customers are authenticated externally, you can now set the authenticationMode to ExternalAuth to create Customers without a password.

Changes:

  • [API] Added authenticationMode field to Customer and CustomerDraft.
  • [API] Changed password field to be optional on CustomerDraft when authenticationMode is set to ExternalAuth.
  • [API] Removed password field from Customer when authenticationMode is set to ExternalAuth.
  • [API] Added Set AuthenticationMode update action.
  • [GraphQL API] Added the following types to the GraphQL schema: AuthenticationMode, SetCustomerAuthenticationMode.
  • [GraphQL API] Changed the Customer type:
    • Customer.password field type changed from String! to String
    • Added the authenticationMode field to the Customer type.
  • [GraphQL API] Changed the CustomerSignUpDraft type:
    • CustomerSignUpDraft.password input field type changed from String! to String
    • Input field authenticationMode was added to CustomerSignUpDraft type
  • [GraphQL API] Changed the CustomerUpdateAction type:
    • Input field setAuthenticationMode was added to CustomerUpdateAction type
  • [GraphQL API] Changed the CustomerSignMeUpDraft type:
    • CustomerSignMeUpDraft.password input field type changed from String! to String

The following changes were introduced in terms of GraphQL SDL:

extend type Customer {
authenticationMode: AuthenticationMode
}
extend input CustomerSignUpDraft {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
authenticationMode: AuthenticationMode
}
extend input CustomerUpdateAction {
setAuthenticationMode: SetCustomerAuthenticationMode
}
"AuthenticationMode values. BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
enum AuthenticationMode {
ExternalAuth
Password
}
input SetCustomerAuthenticationMode {
authMode: AuthenticationMode!
password: String
}