Skip to main content

mitid_connect

Log in through MitID from Python: an unofficial implementation of MitID's browser client. It authenticates with the MitID app - by QR code or one-time code - or with a code token, and gives back the authorization code that the service being logged in to exchanges for its own tokens.

It is asynchronous, and runs on the aiohttp session the caller gives it - the session of the service's login flow, as MitID's steps share its cookies:

import aiohttp
from mitid_connect import BrowserClient

async with aiohttp.ClientSession() as session:
    client = BrowserClient(session, client_hash, authentication_session_id)
    await client.start()
    authenticators = await client.identify_as_user_and_get_available_authenticators("username")
    await client.authenticate_with_app()  # approve in the MitID app
    code = await client.finalize_authentication_and_get_authorization_code()

client_hash and authentication_session_id come from the service's NemLog-in page; get_authentication_code does all of the above from that page's parameters. While the app login runs, get_current_qr_codes() gives the two QR codes to show in turn, and status_message how far it has come.

mitid_connect.testing.SimulatedMitID is a MitID on a local test server, for tests. It answers an app login, and a code token login with its password, as MitID does, and checks the client's proofs as MitID does. Its users have the app by default; a User gives one a code token, its digits and the password instead. Its Network gives each answer a latency, fixed or drawn from a range, and fails a share of them, for stress tests.

It is used by aula_connect to log in to Aula.

Origin and licence

It carries on MitID-BrowserClient by Hundter, under the MIT licence (LICENSE).

Metadata

Release files for mitid-connect 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mitid-connect 0.1.0
File Size Uploaded Provenance Actions
mitid_connect-0.1.0.tar.gz 32.2 kB With provenance Details for mitid_connect-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mitid-connect 0.1.0
File Interpreter ABI Platform Actions
mitid_connect-0.1.0-py3-none-any.whl Python 3 none any Details for mitid_connect-0.1.0-py3-none-any.whl

Total release size: 51.3 kB

Release files / mitid_connect-0.1.0.tar.gz

Download URL mitid_connect-0.1.0.tar.gz
Size 32.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bffdb0263d3aea7eee53117b60125983131142e35c2b923b21e18e5460a7c982
BLAKE2b-256 checksum
How to use checksums
e71f574b5063c477c28d782604f8b99453437d052564e0908f6ac1dad13e5694
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / mitid_connect-0.1.0-py3-none-any.whl

Download URL mitid_connect-0.1.0-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63bf4b96c8d6c597204ca7ea28913e728860f11b251f086144343601b5a6cdad
BLAKE2b-256 checksum
How to use checksums
a301ad824de767648195b1ff1ff89d50de67af01f23a2b213ce0ba1a73e07fb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Security for mitid-connect 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mitid_connect-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page