# OpenID Connect

{% hint style="info" %}
*Every SSO provider is a little bit different. Please* [*contact us*](mailto:hello@appetize.io) *with any questions!*
{% endhint %}

## Check authorization server groups scope

Check the "scopes" configuration of your authorization server, and verify there is a scope called `groups`. If not, add a scope named `groups`.

<figure><img src="https://2147444700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJUveBCJfn0GR8-hlqi%2Fuploads%2Fgit-blob-9bca61db9172d42d0b1bc5d0ef9f772643402662%2Fokta-add-groups-scope.png?alt=media" alt=""><figcaption><p>OKTA add groups scope example. In Security -> API -> Authorization servers -> Choose Server -> Scopes</p></figcaption></figure>

## Create a new application

<figure><img src="https://2147444700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJUveBCJfn0GR8-hlqi%2Fuploads%2Fgit-blob-d2ad7c168a6889d89362464a7c450ef3cc1440b7%2Fimage%20(1)%20(1)%20(2).png?alt=media" alt="Example creating new &#x22;Web&#x22; application in OKTA"><figcaption><p>Example creating new "Web" application in OKTA</p></figcaption></figure>

## Configure app settings

| Field               | Value                         |
| ------------------- | ----------------------------- |
| Allowed grant types | Authorization Code            |
| Login redirect URIs | TBD - provided by Appetize.io |
| Initiate login URI  | TBD - provided by Appetize.io |

<figure><img src="https://2147444700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJUveBCJfn0GR8-hlqi%2Fuploads%2Fgit-blob-9eec0187e85484b20d7e1c9474b6b77bf0e18847%2Fimage%20(5)%20(1)%20(1)%20(1).png?alt=media" alt="Example app settings in OKTA"><figcaption><p>Example app settings in OKTA</p></figcaption></figure>

### Add group assignments to claims

We will need to configure your SSO provider to send over the user's groups assignments after a successful login.

The following example shows how to pass through groups with prefix appetize\_\* as a groups claim within OKTA. This can be done by adding the groups claim to your authorization server at API -> Authorization Servers. For some OKTA clients, this can also be done under the "Sign On" section in your app's configuration, where you can add groups the same way.

<figure><img src="https://2147444700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJUveBCJfn0GR8-hlqi%2Fuploads%2Fgit-blob-7f5a992454c07d583ebef06757a0a3e32d58e761%2Fimage%20(3)%20(2)%20(1)%20(1).png?alt=media" alt="Example including appetize_* group assignments claim in OKTA"><figcaption><p>Example including appetize_* group assignments claim in OKTA</p></figcaption></figure>

## **Information to provide to Appetize**

1\. We will need the "**Client ID**" and "**Client secret**" for the app you just created.

<figure><img src="https://2147444700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJUveBCJfn0GR8-hlqi%2Fuploads%2Fgit-blob-f5ed0707dae2e008c0fc63d4be06ea182be171ed%2Fimage%20(6)%20(1).png?alt=media" alt="Example Credentials to provide to Appetize.io"><figcaption><p>Credentials to provide to Appetize.io</p></figcaption></figure>

2\. We will also need your **Metadata URI**, often called "Discovery URL". For example: <https://dev-548472.oktapreview.com/oauth2/default/.well-known/oauth-authorization-server>

In OKTA, this is available in Security -> API -> Authorization servers -> Choose Server.

If the metadata endpoint is not available, you may also specify the required fields below:

* **authorization\_endpoint**
* **token\_endpoint**
* **userinfo\_endpoint**
* **jwks\_uri**
* **issuer**
* **introspection\_endpoint**
