components/apple/convex.config
Variables
default
const default: ComponentDefinition<any, {
CLIENT_ID: VString<string, "required">;
KEY_ID: VString<string, "required">;
PRIVATE_KEY: VString<string, "required">;
TEAM_ID: VString<string, "required">;
}>;
The Apple oauth component. Install it once, with the httpPrefix its
callback is served under, and bind the four values from your Apple
developer account:
app.use(authApple, {
httpPrefix: "/oauth/apple",
env: {
CLIENT_ID: app.env.AUTH_APPLE_CLIENT_ID,
TEAM_ID: app.env.AUTH_APPLE_TEAM_ID,
KEY_ID: app.env.AUTH_APPLE_KEY_ID,
PRIVATE_KEY: app.env.AUTH_APPLE_PRIVATE_KEY,
},
});
Apple has no static client secret - instead, it takes the pieces needed to sign a fresh one for every token exchange:
CLIENT_IDis the Services ID registered for your website, e.g.com.example.app.web.TEAM_IDis your 10-character Apple developer team id.KEY_IDis the 10-character id of the Sign in with Apple key.PRIVATE_KEYis the contents of that key'sAuthKey_<KEY_ID>.p8file.