# GitHub Single Sign-On Configuration

Docvora has the ability to link GitHub as a single sign-on option that allows accounts to be linked and created with GitHub, with the option to require the user be apart of a certain organisation.



Creating a GitHub Application





Open GitHub developer settings and create a new OAuth application.





Set an application name, URL, and upload a logo if desired.



Set a redirect for Docvora by using the below URL format.

https://${DOMAIN}/auth/github/callback

Replace ${DOMAIN} with your domain.






Save the changes



Copy the Client ID and secret and set them aside for below steps.



Configuring Docvora





Enter the Docvora staff panel on your instance and navigate to the below menu.

Staff Panel > Docvora Settings > Login Methods > Discord



Enable the SSO method with the checkbox.



Enter the earlier saved client ID and secret.





Click save.



Your docvora instance will internally restart services to enable the login method. This may take up to a minute to reflect on the login page.





 Setting a Required GitHub Organisation





Navigate to the below URL and replace the ${ORG_NAME} with the same of the required organisation.

https://api.github.com/orgs/${ORG_NAME}





Copy the id from the returned JSON. E.g; 118330185



Paste the id into the GitHub single-sign on settings.



Click save.



Your docvora instance will internally restart services to enable the login method. This may take up to a minute to reflect on the login page.

Docvora has the ability to link GitHub as a single sign-on option that allows accounts to be linked and created with GitHub, with the option to require the user be apart of a certain organisation.

### Creating a GitHub Application

1. Open [GitHub developer settings](https://github.com/settings/developers) and create a new OAuth application.![A boring example image](https://faxes.zone/i/NOlp5.png)
2. Set an application name, URL, and upload a logo if desired.
3. Set a redirect for Docvora by using the below URL format.

```bash
https://${DOMAIN}/auth/github/callback
```

Replace ${DOMAIN} with your domain.  

4. Save the changes
5. Copy the Client ID and secret and set them aside for below steps.

---

## Configuring Docvora

1. Enter the Docvora staff panel on your instance and navigate to the below menu.  
     
   Staff Panel > Docvora Settings > Login Methods > Discord
2. Enable the SSO method with the checkbox.
3. Enter the earlier saved client ID and secret.![A boring example image](https://weblutions.com/i/99bmXZ.png "An example")
4. Click save.
5. Your docvora instance will internally restart services to enable the login method. This may take up to a minute to reflect on the login page.

---

### Setting a Required GitHub Organisation

1. Navigate to the below URL and replace the ${ORG\_NAME} with the same of the required organisation.

```
https://api.github.com/orgs/${ORG_NAME}
```

2. Copy the `id` from the returned JSON. E.g; 118330185
3. Paste the `id` into the GitHub single-sign on settings.
4. Click save.
5. Your docvora instance will internally restart services to enable the login method. This may take up to a minute to reflect on the login page.
