National-ID-Program-Ethiopia/fayda-auth-python ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Python library and simple example app for logging users in with Fayda Esignet OAuth.

I want something that can generate the authorization link, keep track of the session safely in Redis, and then finish the login by exchanging the auth code for user info. It should also support the modern client assertion flow using a JWK private key from environment variables. Please include a clean way to configure the Fayda URLs, client id, Redis settings, and redirect URI from a .env file.

I’d like a basic Flask example too, with one route to start the login and one route to handle the callback and return the user profile. Use realistic responses and make it easy to test locally. If anything about the Fayda docs is unclear, look up the current docs online and follow the expected OAuth flow. Also add a few tests so I can see the main pieces working.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab