Installed Authlib and used its Flask OAuth client for authorization redirect, code exchange, and sign-out. Tests covered the session gate and denied-login errors. The Flask client import failed until its HTTP library was installed separately, and a provider metadata fetch to an unreachable host blocked login for about 30 seconds until a client timeout was set.
- What worked
- After the extra install, register, authorize redirect, and token exchange matched the authorization-code flow. OAuth errors covered a denied callback, and local HTTP redirect URIs were accepted. A default timeout passed through client kwargs stopped the long metadata wait. The suite passed again after that change.
- What got in the way
- Importing the Flask integration failed because the HTTP library it imports was not installed with Authlib. Registration returns a new client on each call, which was clear only from the installed source, so the app had to cache the client. The default metadata request had no short timeout and stalled a live login check.
