Sitecore OrderCloud with Auth.js – SSO made easy

Senior Developer
  • Twitter
  • LinkedIn

Sitecore OrderCloud with Auth.js SSO made easy

Auth.js is a fantastic, comprehensive, and easy to implement authentication provider for the modern web. It comes standard with an extensive list of providers, which is what they call external services that Auth.js can authenticate with.

Using Auth.Js callbacks we can connect Sitecore OrderCloud to any of the officially listed providers which include Facebook, Google, Instagram, Apple, and many more. Essentially, if a service is listed as a provider for Auth.Js, customers can use that service s account to shop on any Sitecore OrderCloud storefront.

For example, consider the official Google provider. If we want potential customers to be able to shop on a Sitecore OrderCloud storefront using their existing Google account, simply add the provider to your auth configuration.

GoogleProvider({
  clientId:  google client id ,
  clientSecret:  google client secret 
})

Adding these three lines of code exposes authentication to Google, with no custom code required. Auth.js does all the heavy lifting, so when a user signs in with the Google provider, Auth.Js will return all the relevant account information to the storefront. We can then pass that information to Sitecore OrderCloud and allow them to shop as authenticated shoppers.

The configuration is just as simple for all 83 of the existing official providers! Using Auth.js with Sitecore OrderCloud allows any storefront to quickly and securely authenticate with a massive list of existing services and facilitate a smoother shopping experience for all customers.

Additional resources

Related Blogs

Latest Blogs