Github
The Github third party provider can be customized using the following config:
let supertokens = require("supertokens-node");
let ThirdParty = require("supertokens-node/recipe/thirdparty");
supertokens.init({
supertokens: {...},
appInfo: {...},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
ThirdParty.Github({
clientSecret: "GITHUB_CLIENT_SECRET",
clientId: "GITHUB_CLIENT_ID",
scope: [
"additionalFeatureURL",
],
authorisationRedirect: {
params: {
additionalParam: "additionalValue",
}
}
})
]
}
})
]
});
Parameters
clientSecret
- type:
String
- description: It is a secret used only 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 it grants read/write access to profile info only. Additional features can be found here
- type:
authorisationRedirect
params
- type:
object
- description: Add additional params to authorisationRedirect.
- type:
To get your client id and client secret please refer to the following
documentation