This SDK documentation is outdated. Please do not refer to it, and instead visit the User Guides section.

Skip to main content
Version: 7.2.X

Github

The Github third party provider can be customized using the following config:

import supertokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

supertokens.init({
supertokens: {...},
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
ThirdParty.Github({
clientSecret: "TODO: GITHUB_CLIENT_SECRET",
clientId: "TODO: GITHUB_CLIENT_ID",
scope: [
"additionalFeatureURL",
],
authorisationRedirect: {
params: {
additionalParam: "additionalValue",
}
}
})
]
}
})
]
});

Parameters#

  • clientSecret

    • type: String
    • It is a secret used only for authorisation in server-side operations.
  • clientId

    • type: String
    • It is the public identifier for the app.
  • scope

    • type: String[]
    • 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
  • authorisationRedirect

    • params
      • type: object
      • Add additional params to authorisationRedirect.
Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI