๐ŸPython (Flask)

Estimated time: 4 minutes

Create an app

If you have completed the workspace configuration from Entry Dashboard, skip this and proceed to Run a sample app locally

The basis of any integration is creating a client app in your workspace.

  1. Choose your App ID: it must be an ASCII combination that your app will use for integrating.

  2. Set App Protocol to openid-connect - Entry uses this protocol for seamless secure integrations, originating from customer apps.

Configure your App

Next, you will configure your App and receive the parameters you will need to save on your backend.

Configure your redirect URIs

Here we are providing the settings for your local development, assuming that you will be running a quickstart sample from our repo.

  1. Put http://localhost/* in Valid Redirect URIs field - you will need this so that Entry would send you back to your app after successful login. On the screenshot below it's highlighted in blue.

  2. Copy your Secret Key - you will need it for configuring your example.

  3. Copy a domain part of the Authorization Endpoint (highlighted in green): in this case it's entry-dev.xix.ai/auth/realms/testworkspace - note that you'll need to skip the "https://" part and the rest of the URL, the library will handle these parts for you.

That's it! Now you are ready to test Entry with a sample app or to integrate it with your Python app based on our quickstart.

Run a sample app locally

Estimated time: 2 minutes

This is the part of the repo that stores the sample code:

  1. Open your terminal.

  2. Clone the repo and go to the web-app-python directory: git clone https://github.com/XIX-Entry/quickstarts.git && cd web-app-python

  3. Make a local copy of your .env file to store your configuration: cp .env.example .env

  4. Open your new .env file with your favorite text editor and put your settings into the file:

    1. CLIENT_ID should be your App ID from above, in this case quickstart-app

    2. CLIENT_SECRET should be your Secret key

    3. WORKSPACE should be the lowercase identifier of your workspace.

    4. ENTRY_ENDPOINT a part of the Authorization Endpoint we've copied before: https://entry.xix.ai/auth/realms

    5. APP_SECRET_KEY can be just a random string.

  5. Run you application with ./run.sh command.

  6. Open your sample app in any browser at http://localhost:3000 - you will be able to log in into your sample app with Entry, and after being redirected, you will see the raw content of your user profile.

Last updated