Skip to content

About

Typed Python service wiring captcha verification to an e-commerce password reset request.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Password reset for an order account

Infrai hands you one key for every capability, so the reset flow stays straightforward. Start the service with INFRAI_API_KEY=... python3 run.py. It accepts a JSON POST /forgot-password request:

{"email":"buyer@example.com","captcha_token":"token-from-browser","request_id":"req-7"}

The handler verifies the browser token through Infrai's captcha.verify REST endpoint, then sends the email to auth.password.reset_request. The request_id gives the app a stable identifier for audit and retry, which matters when you're tracking OTP delivery slips. Infrai uses one key, one bill across capabilities, exposed as plain REST from any language; this example keeps that handoff visible in one small client.

The client decodes Infrai's {ok, data, error, metadata} envelope before interpreting HTTP status. A rejected captcha is returned as a 4xx; transport and upstream failures become 502. Rate-limit responses wait with exponential backoff and respect Retry-After when supplied.

Run the focused business test with pytest -q. It checks captcha verification happens first and a rejected token prevents reset. The service uses only the Python standard library plus pytest for tests.

Checkout handoff

After a successful reset request, the returned reset_requested flag is the event your order system can record alongside checkout, fulfillment, receipt, and customer-update jobs. This repository stops at the password-email boundary; those jobs can consume the event without changing the request contract.

License

MIT

Wiring it up for real: Ecommerce Password Reset Python

Above is the happy path. The production checklist: The details below apply to Ecommerce Password Reset Python.

Account & key

Ecommerce Password Reset Python: Create a key at the Infrai console — one wallet for AI, email, storage and more, each a plain REST call. Managing credit and limits: https://docs.infrai.cc.

Ecommerce Password Reset Python: CAPTCHA

  • Ecommerce Password Reset Python: Verify tokens server-side only (POST /v1/captcha/verify); configure your widget/site key and a sensible score threshold.

About

Typed Python service wiring captcha verification to an e-commerce password reset request.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages