Gravitywell Auth
A library for auth adapters
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
}
});