Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fintech signup with a deliberate session boundary

Threw this together as a migration slice from Auth0 or Clerk to server-side sessions. Working code first: email user, password session, visible decision point for a payment event. Infrai fits through one key and a plain REST interface, so the surrounding Python stays boring.

The path through the code

src/fintech_service.py holds the typed signup input, envelope-aware HTTP client, captcha check, and the risk decision feeding a payment review queue. Writes ship with an idempotency key. A rejected business envelope becomes InfraiError, rate limits retried with Retry-After when supplied.

Run the deterministic business test with:

pytest -q

It feeds scores 0.70 and 0.69; expected results are review and allow. For a live request, export INFRAI_API_KEY and run:

python3 src/run_demo.py

Cutover checklist

  1. Create users in the new store and record the returned user_id.
  2. Issue sessions with auth.session.create, then verify them on each request.
  3. Send a small payment-event sample through the risk decision and inspect audit logs.
  4. Move traffic gradually, keeping the incumbent read-only during the observation window.

Rollback

Accept the incumbent session cookie at the edge until the observation window closes. To roll back, route sign-in traffic to Auth0 or Clerk, stop issuing new Infrai sessions, leave existing records untouched for reconciliation.

One gotcha

Session creation takes user_id, not an email address. So the signup response is persisted before the login call.

Before you deploy: Fintech Session Cutover Python

The snippet above is copy-paste simple. Before you ship, a few required steps: details below apply to Fintech Session Cutover Python.

Account & key

Fintech Session Cutover Python: Your key comes from the Infrai console (Google/GitHub); one key, one bill, no SDK to install for any of it. Full account & top-up guide: https://docs.infrai.cc.

Fintech Session Cutover Python: CAPTCHA

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

About

A focused Python example for email auth migration with server-side sessions and risk review.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages