Skip to content

Identity Client

Jeremy Brown edited this page Jun 10, 2024 · 1 revision

You will need a client ID and client secret in order to get started using the sample code.

[TOC]

Flex Identity Client

You can create your own Identity client by going to your Identity server, or by using the supplied test site here.

Identity Server Client Configuration

To begin, press the ADD CLIENT button in the top left.

image

Enter a ClientID and Client Name that would like to use. The Client Name is used for logging and informational purposes. That is also what is displayed in the events and auditing.

Select Native Application - Mobile/Desktop for the authentication flow

image

Press SAVE CLIENT

Scopes

Next, in the Basics tab, select all of the available scopes.

image

Localhost Redirect URL Validation

We support localhost as a valid redirect URL and a random port. In order for this to work, you must enable Require Pkce, enable Allow Offline Access, and supply http://127.0.0.1 as a redirect URL.

image

Be sure to press the SAVE CLIENT button.

Client Secrets

Pressing the MANAGE CLIENT SECRETS button will bring you to another page where you can enter a value to use as your client secret. Do not lose this value, otherwise, you will have to recreate another one.

image

App Settings

Each project has its own appsettings.json file that will need to be supplied with your new information.

{
  "FlexApi": {
    "Api": "https://flextest.ooaccess.net",
    "Authority": "https://flextest.ooaccess.net/identity",
    "ClientId": "<YOUR CLIENT ID>",
    "ClientSecret": "<YOUR CLIENT SECRET>",

    "Mqtt": {
      // TCP
      //"Transport": "tcp",
      //"Host": "flextest.ooaccess.net"

      // WebSocket
      "TlsVersion": "Tls12",
      "Transport": "WebSocket",
      "Host": "wss://flextest.ooaccess.net/mqtt"
    }
  }
}

Have fun!