# GitHub

### GitHub as OAuth Identity Provider

To use GitHub as Auth Provider, you must setup a so-called "OAuth App". You can do so in your Github Profile > Settings <https://github.com/settings/developers>

<figure><img src="https://934254130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjNgeI0mUzgw6Re92iTOw%2Fuploads%2FREjI8qgC9ouDzYmvKp6c%2FGithub%20OAuth%20Apps.png?alt=media&#x26;token=b7854af5-7a4e-462a-ad89-7d1c316e1d4b" alt=""><figcaption></figcaption></figure>

On GitHub the creation of an OAuth Client Registration is comparatively simple.

<figure><img src="https://934254130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjNgeI0mUzgw6Re92iTOw%2Fuploads%2FT5vO4mbleoAz5pe135yr%2FGithub%20Client%20OAuth%20Settings.png?alt=media&#x26;token=b37386c8-1380-4c76-9ba0-626a654e6cd8" alt=""><figcaption><p>GitHub Client Registration Settings</p></figcaption></figure>

After configuring the Callback URLs, you can "Generate a new client secret".&#x20;

{% hint style="warning" %}
Make sure you copy the client secret directly, as it is displayed only once. Later you cannot copy it again.
{% endhint %}

Now you go back to Lowcoder Settings > Auth Providers and click "Add OAuth Provider" and select GitHub from the list of Auth Providers.

<figure><img src="https://934254130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjNgeI0mUzgw6Re92iTOw%2Fuploads%2FmPp7JatAjNCxFgckmJ7S%2FOAuth%20Add%20Provider.png?alt=media&#x26;token=b91b12f9-3150-4c50-aefd-d95f498854c4" alt=""><figcaption></figcaption></figure>

You can copy and paste now the Client ID and Client Secret from the GitHub Client App Registration.

<figure><img src="https://934254130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjNgeI0mUzgw6Re92iTOw%2Fuploads%2FRrm3k2PuFgoJgsdigs1j%2FGitHub%20setup%20Auth%20Client.png?alt=media&#x26;token=6405dcdc-32c8-4a1d-b967-17e89d368f7c" alt=""><figcaption></figcaption></figure>

Thats it! Now you can invite new Users to Lowcoder. They can choose GitHub to Sign Up (register) or Sign in / log in.

<figure><img src="https://934254130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjNgeI0mUzgw6Re92iTOw%2Fuploads%2FDKumdgQAdCwfM9Ih8Cof%2FOAuth%20Register%20with%20Invite%20Link.png?alt=media&#x26;token=435f89c5-b34b-4dc2-8554-3ea3bf835733" alt=""><figcaption></figcaption></figure>

When users chose to Sign in or Sign up with GitHub, they will get redirected to the GitHub Login page of the registered Client App

<figure><img src="https://934254130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjNgeI0mUzgw6Re92iTOw%2Fuploads%2FGPNXazl5TtYPygt1VYMq%2FGithub%20OAuth%20Login.png?alt=media&#x26;token=c3bcf563-cd06-4d7c-b892-89daf0b68e53" alt=""><figcaption></figcaption></figure>

Here they have to Authorize your registered Client App to act and impersonate your users.

<figure><img src="https://934254130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjNgeI0mUzgw6Re92iTOw%2Fuploads%2FX7uL5x9Sgyzm2iwyZhs2%2FGithub%20OAuth%20Authorize.png?alt=media&#x26;token=16468ed7-6109-45bb-9e89-ad0450fc058d" alt=""><figcaption></figcaption></figure>
