0.0.6 • Published 4 months ago

@wailroth/adonis-ally-apple-v6 v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Adonis Ally - Apple Sign In Driver

adonis, adonis-ally, apple

This driver extends Adonis Ally and allows to integrate Apple Sign In.

FORKED FROM https://github.com/bitkidd/adonis-ally-apple/tree/main! THANKS TO HIM.

Installation

npm install @wailroth/adonis-ally-apple-v6
# or
yarn add @wailroth/adonis-ally-apple-v6

As the package has been installed, you have to configure it by running a command:

node ace configure @wailroth/adonis-ally-apple-v6

Then open the env.ts file and paste the following code inside the Env.rules object.

APPLE_APP_ID: Env.schema.string(),
APPLE_TEAM_ID: Env.schema.string(),
APPLE_CLIENT_ID: Env.schema.string(),
APPLE_CLIENT_SECRET: Env.schema.string(),

And don't forget to add these variables to your .env and .env.sample files.

PUT THE CONFIGURATION IN ALLY.TS FILE

  apple: apple({
    clientId: env.get('APPLE_CLIENT_ID') || "",
    clientSecret: env.get('APPLE_CLIENT_SECRET') || "",
    callbackUrl: //your url
    appId: env.get('APPLE_APP_ID') || "",
    teamId: env.get('APPLE_TEAM_ID') || "",
    driver: "apple",
  }),

Usage

Apple Driver environment variables have some specific usage:

  • APPLE_CLIENT_SECRET - your app private key that you should download from here
  • APPLE_CLIENT_ID - the id of the key you downloaded earlier, it can be found on the same page. Generaly the app package (for example com.example)
  • APPLE_TEAM_ID - you teams' id in Apple system, it can be found here
  • APPLE_APP_ID - your app idenifier, for ex: com.adonis.ally

For usage examples for Adonis Ally and its methods consult Adonis.js official docs.

0.0.6

4 months ago

0.0.5

4 months ago

0.0.4

4 months ago

0.0.3

4 months ago

0.0.1

4 months ago