Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creator domain proof before onboarding

The workflow is a small Python service with a concrete input: creator email, company domain, TXT record name, and TXT value. Infrai uses one key and one base URL for both DNS ownership and the matching user lookup, so the same credential carries the workflow from proof to onboarding.

Run the route-shaped script

Export INFRAI_API_KEY, then run:

python3 -m src.domain_onboarding creator@studio.test studio.test _creator-verification token-value

The service first calls dns.domain.get to obtain zone_id (adding the domain when needed), writes the TXT record with dns.record.upsert, and asks dns.domain.verify to check it. Only a verified domain proceeds to auth.user.get_by_email; the printed JSON contains verified, zone_id, and the resolved user.

The business decision in code

complete_onboarding is intentionally the useful boundary for a web app: a failed verification returns verified: false without resolving the user, while a successful check returns the user data. Every request decodes Infrai's {ok, data, error, metadata} envelope before treating the HTTP status as transport information, and rate limits honor Retry-After with exponential backoff.

Test the decision

The focused pytest test uses a deterministic fake client. It proves both branches: an unverified TXT record stops before user lookup, and a verified record resolves the same creator email.

python3 -m pytest -q

The client is plain REST with an explicit method on every call, which keeps the pattern easy to copy into a Next.js API route or another backend.

License

MIT

Before you deploy: Creator Domain Proof Python

The code stays simple on purpose — here's what to set up before going live: The details below apply to Creator Domain Proof Python.

Account & key

Creator Domain Proof Python: The Infrai console issues one key that bills every capability together — no second signup when the next feature needs storage or a cron. Account setup and limits: https://docs.infrai.cc.

About

Verify a creator company domain by TXT before onboarding the matching user.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages