Skip to content

OpenID authentication integration with CrossID using basic pyton

Notifications You must be signed in to change notification settings

crossid/sample-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sample-python

A vanilla python project that demonstrates how to perform authentication and authorization via crossid.

Prerequisites

Running locally

First, install dependencies:

python3  -m venv env
source ./env/bin/activate
pip3 install -r requirements.txt

Then you can run the server with

CLIENT_ID=<client_id>\
CLIENT_SECRET=<client_secret> \
REDIRECT_URI=https://localhost/callback \
ISSUER_BASE_URL=https://<tenant_id>.crossid.io/oauth2/ \
python server.py

Deploying on Digital Ocean

Click this button to deploy the app to the DigitalOcean App Platform.

Deploy to DigitalOcean

Note: when creating the web app, put a temporary URLs in Redirect URI and Logout URI until the app is deployed.

Fill the needed enviroment variables: ISSUER_BASE_URL, CLIENT_ID and CLIENT_SECRET.

Or if you have doctl installed then run:

doctl apps create --spec .do/app.yaml

Then go to the DigitalOcean admin screen and update the enviroment variables as stated above.

Take note of the public url of your new app. (replace {public_url} below with the public url)

Finally, go to CrossID admin screen, edit the oauth2 client, and add the correct callback url: {public_url}/callback and to post logout redirect uris as: {public_url}

About

OpenID authentication integration with CrossID using basic pyton

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published