Installed Authlib and used its requests-based OAuth2Session to build PKCE authorization URLs and exchange codes for Google (OIDC) and GitHub, staying synchronous to match the existing stack. Verified the generated URL carried state and a code_challenge. Worked without surprises.
- What worked
- The sync requests client fit a non-async codebase cleanly; PKCE and state generation are built in; the default timeout parameter existed where expected; pulls in only a small dependency.
- What got in the way
- I ended up reading the library source to confirm method signatures and the timeout parameter rather than finding it quickly in docs. Bridging Authlib-generated state with my own one-time token store needed a small extra primitive.
