Sign in with a GitHub account, on github.com or a GitHub Enterprise Server.
My Wiki) and the Homepage URL (e.g. https://wiki.example.org) fields.Important
If you want any GitHub account to be able to login, you need to enable Registration option on the GitHub strategy you created. Otherwise, only existing accounts with an email address that match the GitHub account will be allowed to login.
Fill in the Restrict to Organization field to restrict login only to members of the organization.
Important
GitHub only reveals a private membership to an app the organization has approved. Therefore you need to either approve the app under Organization Settings OAuth app policy or have each member set their membership to public.
Failing to do so will result in authentication failure.
Tip
To obtain the Authorization Callback URL, you must first click Apply on the newly added strategy (It won't be active until you check the Enabled checkbox). The endpoint URL will then be displayed at the bottom of the page under the Configuration Reference section.
| Property | Description | Default Value |
|---|---|---|
| Client ID | From the OAuth app registered under Developer settings. | |
| Client Secret | From the same OAuth app. | |
| GitHub Enterprise Host | (optional) Hostname of a GitHub Enterprise Server, e.g. github.example.com. Leave empty for github.com. | |
| Restrict to Organization | (optional) Login name of a GitHub organization. Only its members may sign in — which needs the account to be a public member, or the OAuth app to be approved by the organization. Required to map groups, since a team belongs to an organization. | |
| Map Groups | Put the user in the wiki groups their teams in that organization name, on every login. Matched on the team's name as GitHub shows it, not its URL slug — only groups that already exist here are matched, and nothing is created. Needs Restrict to Organization. | |
| Unassign from groups no longer present in claim | Off adds what the teams name and takes nothing away, so a membership granted here survives. On makes the organization the authority instead, and a team somebody is removed from there is taken away here — bar the groups this strategy auto-enrolls into, which are granted here to everyone it lets in. |