Skip to content

Implementation of external login with Apple to your Front-Commerce project

License

Notifications You must be signed in to change notification settings

PH2M/front-commerce-external-login-apple

Repository files navigation

Front-Commerce external login Apple

Implement the external login with Apple your Front-Commerce project using passport-applehttps://www.npmjs.com/package/passport-apple and following Front-Commerce documentation

Latest version

Supported Version

✅ Front-Commerce = 2.13+

Installation & Configuration

  1. Install the latest stable version for the module
npm install ph2m/front-commerce-external-login-apple#1.1.0
  1. Generate your Apple credential for Apple auth feature: https://github.com/ananay/apple-auth/blob/master/SETUP.md#configuring-the-library
  2. Add your own configuration on the .env file
[Required] FRONT_COMMERCE_APPLE_CLIENT_ID
[Required] FRONT_COMMERCE_APPLE_CLIENT_TEAM_ID
[Required] FRONT_COMMERCE_APPLE_KEY_ID
[Optional] FRONT_COMMERCE_APPLE_DEFAULT_FIRSTNAME => set default firstname to user who create account with external auth Apple
[Optional] FRONT_COMMERCE_APPLE_DEFAULT_LASTNAME => set default firstname to user who create account with external auth Apple
  1. Create .externalLoginAppleAuthKey.p8 file in your project root directory and past inside content of your AuthKey.p8
  2. Load the module on .front-commerce.js file Is important to load ./node_modules/front-commerce-external-login-apple module before ./node_modules/front-commerce/modules/auth-external-login
 modules: [
    ...
    "./node_modules/front-commerce-external-login-apple",
    //"./node_modules/front-commerce/modules/auth-external-login",
  ],
  webModules: [
    ...
    {
      name: "FrontCommerceConversionsApi",
      path: "./node_modules/front-commerce-external-login-apple/web",
    },
  ],
  1. Include Apple login button by the including following components
+ import AppleSignIn from "theme/components/atoms/SignInButton/AppleSignIn";
+ <AppleSignIn />

Licence

GNU General Public License, version 3 (GPLv3)

About

Implementation of external login with Apple to your Front-Commerce project

Resources

License

Stars

Watchers

Forks

Packages

No packages published