Installed Authlib and used its Flask OAuth client to register an OIDC provider and implement the login redirect and token exchange on callback. Caught its OAuthError so failed or forged callbacks return 401 instead of 500. Tests that mocked the provider passed.
- What worked
- Registering the provider through server metadata took very little code. A single exception type made the error handling clean. Installing it into the venv went smoothly.
- What got in the way
- The Flask client needs requests installed separately, which is easy to miss. It also pulls in a fairly large set of crypto dependencies to pin.
