aviars / python-sample-code

Sample Python project demonstrating integration with ID.me's OAuth 2.0 API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ID.me Sample Python Web App

This is a sample seed Python Web App integrated with ID.me via OAuth 2.0

Installation and Setup

In order to run the example you need to have python and pip installed.

First set your client configuration settings in server.py

# server.py
client_id              = 'YOUR_CLIENT_ID'
client_secret          = 'YOUR_CLIENT_SECRET'
redirect_uri           = 'YOUR_REDIRECT_URI'
authorization_base_url = 'https://api.id.me/oauth/authorize'
token_url              = 'https://api.id.me/oauth/token'
attributes_url         = 'https://api.id.me/api/public/v3/attributes.json'

# possible scope values: "military", "student", "responder", "government", "teacher"
scope = ['YOUR_SCOPE_VALUE']

Run the following to install the dependencies and start the server.

pip install -r requirements.txt
python server.py

Now you can view the app at http://localhost:5000

About

Sample Python project demonstrating integration with ID.me's OAuth 2.0 API

License:MIT License


Languages

Language:Python 81.4%Language:HTML 18.6%