GithubHelp home page GithubHelp logo

authgear / authgear-example-python-flask Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 1.0 6 KB

Authentication for Authgear Python Flask Web Application

Home Page: https://docs.authgear.com/

Dockerfile 6.07% Procfile 0.76% PowerShell 3.92% Shell 3.92% Python 67.73% HTML 17.59%
application authentication authgear flask oauth2 oidc python web authgear-examples

authgear-example-python-flask's Introduction

Authentication for Authgear Python Flask Web Application

This sample repository demonstrates how to add authentication to a Python web app built with the Flask using Authgear.

What is Authgear?

Authgear acts as an IAM provider that is a gatekeeper to the resources you provide to customers as web and mobile applications, APIs, etc. The gatekeeper initiates authorization as outlined in OAuth 2.0. The addition of the OpenID Connect layer adds authentication to secure your users’ digital identities and your product.

How to run the project

Prerequisites

Before you get started, you will need the following:

  • A free Authgear account. Sign up if you don't have one already.
  • Create Authgear OIDC Client App to use it as an OpenID Connect Provider.
  • Make sure that Python 3.10 or above is installed on your machine.
  • Download and Install Pip to manage project packages.

Start by cloning the project into your local machine:

git clone https://github.com/authgear/authgear-example-python-flask.git

Make the project directory your current working directory:

cd authgear-example-python-flask

Rename .env.example to .env and fill it with the client ID, client secret and your Authgear OIDC client app domain. Generate a suitable string for APP_SECRET_KEY using openssl rand -hex 32 from your shell and also set it in the environment file.

Also, add the callback URL to the settings section of your Authgear client app.

Register http://localhost:3000/callback as Authorized Redirect URIs.

Run pip install -r requirements.txt to install the dependencies and run python server.py. The app will be served at http://localhost:3000/.

authgear-example-python-flask's People

Contributors

boburmirzo avatar fungc-io avatar

Stargazers

 avatar

Forkers

buildbro

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.