Apple
The Apple third party provider can be customized using the following config:
let supertokens = require("supertokens-node");
let ThirdParty = require("supertokens-node/recipe/thirdparty");
clientId: string;
clientSecret: {
keyId: string;
privateKey: string;
teamId: string;
};
scope?: string[];
authorisationRedirect?: {
params?: { [key: string]: string | ((request: Request) => string) };
};
supertokens.init({
supertokens: {...},
appInfo: {...},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
ThirdParty.Apple({
clientId: "APPLE_CLIENT_ID",
clientSecret: {
keyId: "APPLE_KEY_ID",
privateKey: "APPLE_PRIVATE_KEY",
teamId: "APPLE_TEAM_ID"
},
scope: [
"additionalScope",
]
})
]
}
})
]
});
Parameters
clientSecret
- type:
Object
- description: It is a secret that contains a keyId, privateKey and teamId used for authorisation in server-side operations.
- type:
clientId
- type:
String
- description: It is the public identifier for the app.
- type:
scope
- type:
String[]
- description: It is a string array which defines your applications access to a users account, by default users email is accessed. Additional features can be found here
- type:
To get your client id and client secret please refer to the following
documentation