Authentiq Flask examples
We'll add another example soon that shows how to connect Authentiq to your user database to easily add two-step verification (through any TOTP-compatible app, e.g. Google Authenticator) and passwordless logins on top of your existing username & password database.
Assuming you have cloned this repository already, on Ubuntu 16.04, install the following packages:
sudo apt-get install python-tox python3-flask python3-requests python3-requests-oauthlib python3-jwt
Or using a virtual environment:
virtualenv -p /usr/bin/python3 env pip install tox flask requests requests-oauthlib jwt
Example 1: Plain OAuth 2.0 —
This example demonstrates how to use Authentiq Connect with an existing 3rd-party OAuth 2.0 client library — the wonderful requests-oauthlib in this case. It simply signs in using Authentiq and displays the retrieved user information.
Example 2: Native Authentiq JS —
This example uses the AuthentiqJS snippet for a richer authentication experience. In particular it shows the following features:
A faster authentication flow using an OpenID Connect ID Token
Instant sign-out from phone using the Authentiq ID app
Simply run tox to run tests on Python 2 and Python 3.
Please help us improve these examples by opening an issue or a pull request.