Coder Social home page Coder Social logo

cloud9charts / knowi-okta-flask-docker Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 15 KB

A simple Flask app to access Knowi Single-Sign-On using Okta for user registration and login.

Dockerfile 2.88% Python 29.02% CSS 1.09% HTML 67.00%
knowi okta-oidc knowi-sso

knowi-okta-flask-docker's Introduction

Knowi-Okta-Flask-Docker

A simple Flask app to access Knowi Single-Sign-On using Okta for user registration and login.

In this tutorial, you’ll use Okta to store the user accounts for your web app, and you’ll use OpenID Connect to talk to Okta to handle the authentication and authorization to Knowi as the Service Provider.

Requirements

Running the App

This app requires Knowi and Okta to run. After creating a free account or using an existing account, next will be a client_secrets.json file which holds our OpenID Connect information. Update the clients_secrets.json.template file in the project folder root with the appropriate Okta variables.

{
  "web": {
    "client_id": "{{ OKTA_CLIENT_ID }}",
    "client_secret": "{{ OKTA_CLIENT_SECRET }}",
    "auth_uri": "{{ OKTA_ORG_URL }}/oauth2/default/v1/authorize",
    "token_uri": "{{ OKTA_ORG_URL }}/oauth2/default/v1/token",
    "issuer": "{{ OKTA_ORG_URL }}/oauth2/default",
    "userinfo_uri": "{{ OKTA_ORG_URL }}/oauth2/default/userinfo",
    "redirect_uris": [
      "http://localhost:5000",
      "http://localhost:5000/oidc/callback"
    ]
  }
}

Next, define some necessary environment variables (or update Dockerfile ENV)

export KNOWI_CUSTOMER_TOKEN={{ KNOWI_CUSTOMER_TOKEN }}
export OKTA_AUTH_TOKEN={{ OKTA_AUTH_TOKEN }}
Build application
$ docker build -t knowi-okta .
Run application
$ docker run --name knowi-okta -d -p 5000:5000 knowi-okta

On a browser, visit http://localhost:5000 and explore the site!

knowi-okta-flask-docker's People

Contributors

ezeagwulae avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.