@gravitywelluk/auth
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Gravitywell Auth

A library for auth adapters

CI License Downloads Version


Usage

import { AppleAdapter } from "./AppleAdapter";

export const handler = AuthHandler({
  providers: {
    apple: AppleAdapter({
      issuer: new Issuer({
        issuer: "https://appleid.apple.com/",
        authorization_endpoint: "https://appleid.apple.com/auth/authorize",
        token_endpoint: "https://appleid.apple.com/auth/token"
      }),
      clientID: Config.CLIENT_ID, // e.g. com.appname.native
      clientSecret: Config.APPLE_CLIENT_SECRET, // Generated from Apple certs
      scope: "name email", // scopes you want access to
      onSuccess: authenticateUser // What to do with the resulting 
    }),
    /// ...other auth adapters
  }
});

Package Sidebar

Install

npm i @gravitywelluk/auth

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

8.39 kB

Total Files

9

Last publish

Collaborators

  • gravitywell.uk